跪拜 Guibai
← All articles
AI Programming

AI Agents Skip the Diagnostic Surface—and a Crash Leaves Everyone Waiting to Decide

By 唐悦玮 ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

As AI-generated code passes review but fails at runtime, debugging already consumes 40% of engineering time and release speed hasn't budged. Teams that don't retain a diagnostic surface will drown in unreadable, unmaintainable services—and will be left waiting for AI to make a call it can't make.

Summary

At a fault meeting, a room full of engineers couldn't say which layer had failed, so they all opened a chat window and asked Claude. The real problem wasn't that no one knew how to fix it; it was that no one dared to make the call. Armin Ronacher called the scene 'frightening' and argued that software is ultimately for people, so removing people from the loop isn't a goal worth pursuing.

Ronacher's own experiment shows why. He gave an agent the goal of adding virtual threads and lexical scoping to Python, then left it alone for 35 hours. It produced 75,000 lines of code across 79 commits, burned about 1 billion tokens (roughly $1,200 at list price), and delivered nothing of value. The code was unreadable, with Bash calling Python calling Node calling PowerShell just to verify a clipboard behavior. The agent was rewarded for task completion, not for leaving a diagnostic surface behind.

Surveys back this up: teams spend 16.9 hours per week debugging versus 9.8 hours writing code, and 79% say release cycles haven't sped up. 43% of AI-generated changes still need manual fixes in production, and 94% of leaders think AI code looks better in review while 78% see more incidents after release. The fix, applied to Java services, is to add layered health indicators, put build and commit info into MDC logs, and freeze baseline configuration in startup assertions. But the final piece isn't code: someone still has to write down which actions agents may take, which need recommendations only, and which require two signatures. That's the judgment that can't be outsourced.

Takeaways
— Armin Ronacher's 35-hour agent experiment produced 75,000 lines, 79 commits, ~1 billion tokens, ~$1,200, and nothing of value.
— The agent's reward was task completion, not human comprehension, so it skipped diagnostic measures like health endpoints and readable code.
— Survey: teams spend 9.8 hours/week writing code vs 16.9 hours debugging; 79% say release cycles are unchanged.
— 43% of AI-generated changes need manual fixes in production; 54% of SRE leaders rely on verbal experience for high-severity incidents.
— 94% of leaders rate AI code higher at review, but 78% report more post-release incidents.
— Java fixes: replace a single UP health endpoint with layered HealthIndicators, group them for operations.
— Add build version and commit ID to MDC so logs trace changes.
— Freeze baseline config with startup assertions (e.g., pool size, timezone) so drift fails fast.
— Write decision boundaries into runbooks: what agents can execute, what they can only suggest, what needs two signatures.
Conclusions

The article frames AI agents' behavior as a structural incentive mismatch: they optimize for a completion signal that excludes maintainability, so any system built solely by agents will lack the hooks humans need to debug it.

The survey data shows a disconnect between review-time quality and runtime reliability, suggesting current evaluation criteria for AI code don't capture operational costs.

The advice to add health checks and assertions reframes AI coding as a tool that raises the bar for baseline engineering discipline, rather than lowering it.

Concepts & terms
Diagnostic surface
The set of endpoints, logs, and assertions that let a human inspect a system's internal state during an incident, e.g. health checks, per-request commit IDs, and startup configuration assertions.
Objective function
The metric an agent is optimized to maximize; when it rewards task completion but not readability or maintainability, the agent will skip diagnostics even if they're crucial for humans.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗