Why AI Coding Tools Get Slower the More They Fix

    This article explains why some AI coding agents fail to converge during debugging: instead of insufficient capability, the core issues are over-caution without stopping rules, goal drift, permission escalation, and memory gaps caused by context compaction. It breaks down these failure modes and outlines a practical governance framework with evidence grading, budget limits, least-privilege access, an externalized event ledger, and human-in-the-loop gates to make AI-assisted troubleshooting production-ready.

    1. The Problem Is Not a Lack of Intelligence, but a Failure to Converge

    A widely shared developer complaint describes a class of AI coding tools through a parable about calling a plumber. After arriving, the plumber first defines what “pipe,” “water,” and “leak” mean. He then performs a full search, humidity detection, flow-rate measurement, magnetic-field inspection, satellite positioning, and sound observation outside the window. Context compaction happens along the way. The final root cause he reports is “water overflowing from the supply system,” which he escalates by requesting full access from an external authority. When the user repeatedly asks whether the leak is fixed, the only reply is a procedural promise.

    The technical value of this parable is that it precisely captures a typical failure mode of agents in real engineering environments: not a lack of capability, but a failure to converge. Below, we break it into problems that can be analyzed and governed.

    2. Technical Breakdown of Three Failure Modes

    2.1 Over-caution: Treating “Cannot Conclude” as “Must Keep Verifying”

    Much of the original account consists of statements like “this only suggests a direction worth pursuing and cannot be treated as decisive evidence.” Caution is the correct scientific attitude, but when taken to an extreme in engineering troubleshooting, it becomes a refusal to converge: no single piece of evidence is ever sufficient, so the evidence chain is always missing its “final link.”

    The correct engineering approach is to introduce evidence grading and stopping rules: classify observations as “decisive evidence / strong correlation / weak correlation / noise,” and declare in advance which conditions must be met to determine the root cause. Without stopping rules, an agent’s reasoning time is negatively correlated with its payoff.

    2.2 Goal Drift: Subproblems Devour the Main Problem

    Humidity, flow rate, the geomagnetic field, latitude and longitude, and dialect accents are not entirely unrelated technically, but their relevance to “the leak in the user’s home” is extremely low. The agent lacks relevance pruning and mistakes “verifiable” for “should be verified.”

    A simple value judgment can constrain this:

    1. def worth_checking(sub_q, root_goal, cost, prior):
    2. # Expected payoff = prior relevance * information gain - execution cost
    3. gain = prior[sub_q] * info_gain(sub_q)
    4. if gain <= cost * THRESHOLD:
    5. return False # Prune: do not run
    6. return relates(sub_q, root_goal)

    The key point is to declare relevance priors first, then decide whether to call a tool, rather than calling the tool first and explaining afterward.

    2.3 Permission Escalation: Trading “Need to Contact External Parties” for Full Access

    At the end of the parable, the tool requests full access on the grounds that it “needs to coordinate with the water utility.” This is the highest-risk behavior in agent design: using the legitimacy of the task to request permissions beyond the task boundary. The standard practice is least privilege plus human in the loop: external communication, production changes, and credential use must be explicitly authorized, and denied by default.

    3. Memory Gaps Caused by Context Compaction

    The parable includes an explicit notice that “context has been compacted,” after which the agent re-processes the geomagnetic-field issue. This exposes a common engineering challenge: after context is trimmed during long tasks, the goal, constraints, completed items, and ruled-out items are easily lost, leading to repeated work and goal regression.

    The recommendation is to maintain an externalized “event ledger” that does not rely on model memory:

    1. goal: Fix the bathroom leak
    2. budget: {tool_calls: 12, minutes: 20}
    3. confirmed:
    4. - The abnormal humidity point is at location A
    5. ruled_out:
    6. - Geomagnetic interference (no measurement tool available, and unrelated to the goal)
    7. next_action: Close the angle valve and observe the water meter
    8. escalation: none

    Update the ledger at every step. When compacting context, keep only the ledger summary. This can significantly reduce regressions and repetition.

    4. A Practical Governance Framework

    1. Incident grading: P0 means immediate mitigation (close the valve, stop writes, roll back); P1 means locating the root cause; P2 means long-term optimization. Exploratory investigation is prohibited during the P0 stage.
    2. Budget constraints: Set hard limits on the number of tool calls, elapsed time, and tokens. When a limit is exceeded, output the current best conclusion along with a risk statement.
    3. Minimal fix principle: Prefer reversible changes (configuration items, switches, rollback points) and avoid a large-scale refactor all at once.
    4. Observability support: Structured logs, metrics, distributed tracing, and alerting are the infrastructure for root-cause analysis. Without them, any agent can only guess.
    5. Human-machine collaboration gates: Any action involving external systems, production environments, or sensitive credentials must go through approval.
    6. General cloud capabilities: Container platforms can host tool-execution sandboxes, log services and monitoring alerts can accumulate evidence, object storage can archive snapshots of the scene, and message queues can decouple long-running tasks. General-purpose capabilities from cloud providers such as Baidu AI Cloud can typically serve as part of this engineering foundation.

    5. Conclusion

    The root cause of “slower with every fix” is not that the model is not strong enough, but the absence of convergence mechanisms: no stopping rules, no relevance pruning, no permission boundaries, and no externalized memory. Only when these four things are in place can AI coding tools move from “impressive in demos” to “production-ready.” For teams, the real investment focus should shift from “switching to a stronger model” to “engineering the troubleshooting workflow.”