The Hardest Part of AI Coding Agents Isn't Writing Code—It's Knowing When to Act

The hardest part of a coding agent is judging when to act, ask, or not touch.
A developer shared on Reddit their experience building a coding agent, noting that the real effort goes into giving it "good judgment" rather than intelligence. They categorize agent failures as over-enthusiasm causing change proliferation and timidity pushing decisions back to humans—both from lacking task boundary judgment. Using a context-based three-way rule with sandbox self-verification, model routing, and multimodal support, the agent scored 82% on SWE-bench Verified. The author argues behavioral constraints matter more than benchmark gains.

A developer shared their experience building a coding agent on Reddit, and the conclusion was surprising: the truly draining part isn't making the model smarter—it's giving it "good judgment." This observation hits a real pain point for many Agent products in production—capabilities go up, but the experience falls apart.
Two Kinds of Maddening Agents
The author categorizes annoying agent behavior into two types. One is the "overly enthusiastic" type: you ask it to change a single function, and it goes ahead and refactors three files you never mentioned. The other is the "timid" type: it asks "can I continue?" after every semicolon it writes.
These two behaviors seem opposite but are fundamentally the same—the agent lacks judgment about task boundaries. The former causes uncontrolled change proliferation, while the latter pushes all decision-making costs back onto humans. In real development workflows, both severely undermine collaboration efficiency.
A Context-Aware Three-Way Classification
The solution the author ultimately adopted is a context-based action classification:
- Act directly: When the task description is clear and the change scope is controllable, don't interrupt the user
- Proactively ask: When there's substantive ambiguity or the impact of changes is significant, confirm first
- Never touch: There's a set of things that should never be touched no matter how "worth changing" they seem
The value of this rule set is that it transforms "judgment" from a model capability problem into a policy design problem. The agent doesn't need to become smarter to judge boundaries—it needs a clear set of action guidelines plus accurate assessment of context.
Supporting Mechanisms That Make "Acting" Safe
Behavioral guidelines alone aren't enough. The author emphasizes that several supporting modules are indispensable.
Self-Verification Loop
The agent runs its own changes in a sandbox, finds bugs, fixes them itself, and only then reports completion. This design dramatically reduces the risk of "acting directly"—because the definition of "acting" already includes a verification step. The trade-off is that each task is somewhat slower than pure generation, but the author considers this exchange worthwhile.
Model Routing
Each request is automatically assigned to the most appropriate model—not every decision requires the biggest one. The cross-modal routing integration process was quite painful, but it pays off on both cost and performance. This is actually an easily overlooked aspect of engineering practice: using a large model for simple judgments wastes money and isn't necessarily more accurate.
Model Routing refers to dynamically selecting models of different sizes or specialties when a request comes in, based on signals such as task type, difficulty, context length, or cost budget. The rationale: simple judgments can be handled by small models with lower latency and cost; only genuinely difficult reasoning warrants calling the strongest model. The engineering challenge lies in designing routing criteria—misrouting leads to simple tasks being over-consumed or complex tasks being handled carelessly. Common practice is to use a lightweight classifier or rule-based scoring first, combined with a fallback mechanism. Cross-modal routing also requires handling differences in input/output formats across models, which is why the author describes the integration process as painful.
Multimodal Capabilities
The agent handles not just text and code but can also generate images and other multimodal content, expanding its applicable scenarios.
SWE-bench Verified is one of the mainstream benchmarks for measuring coding agent capabilities. It selects 500 human-verified, clearly described, and reproducible samples from issues and corresponding PRs in real open-source repositories, requiring the agent to autonomously locate problems and generate patches in an isolated environment, with unit test passage as the final criterion. Because the problems come from real engineering scenarios, scoring is objective, and anti-cheating design is rigorous, it's often used as a cross-comparison benchmark for coding agents. It should be noted that scores are heavily influenced by the harness (evaluation scaffold), and results from different implementations may not be directly comparable—which is why the author specifically notes the use of the official harness to ensure comparability.
Results and Openness
The author mentions that the agent achieved 82% (410/500) on SWE-bench Verified using the official harness, with patches publicly available. The post explicitly discloses the author's developer identity, states the product is developed in India and free to use, and expresses a desire not to turn the post into an advertisement.
Interestingly, the post ends with a question: How does your agent handle this problem—hard rules, learned behavior, or human intervention for high-risk operations? The question itself shows that there's no consensus on designing agent behavioral boundaries.
Why This Perspective Matters
Most current discussions about agents focus on capability ceilings: can they complete more complex tasks, can they call more tools. But in actual use, what users notice most is often "did it stop when it should have." An agent that constantly oversteps in its modifications, no matter how capable, can't be trusted in production; an agent that asks permission for everything degrades into an advanced autocomplete that needs constant supervision.
The takeaway from the author's practice: agent reliability comes from the combination of behavioral constraints and verification mechanisms, not just the model's reasoning capability alone. For teams building agent products, the judgment logic of "when to act, when to ask, when not to touch" may be more worth investing in than squeezing out a few more benchmark points.
One-line Summary
The hardest part of a coding agent is judging when to act, when to ask, and when not to touch.
Paragraph Summary
A developer shared on Reddit their experience building a coding agent, pointing out that the real challenge is giving the agent "good judgment" rather than making the model smarter. They categorize agent failure modes into two types: over-enthusiasm causing change proliferation, and timidity pushing decision costs back to humans—both fundamentally stemming from a lack of task boundary judgment. The author adopted a context-based three-way action classification—act directly, proactively ask, never touch—combined with a sandbox self-verification loop, model routing, and multimodal capabilities to make "acting" safe. The agent scored 82% on SWE-bench Verified using the official harness, with patches publicly available and the product free to use. The author believes that combining behavioral constraints with verification mechanisms is more worth investing in than simply raising benchmark scores.
Related articles

RAG Interview Essentials: Breaking Down the Full Offline Indexing and Online Retrieval Pipeline
A complete breakdown of the RAG retrieval-augmented generation workflow: offline document loading, chunking, vectorization, and indexing; online query rewriting, vector retrieval, reranking, and generation, plus core interview points and system optimization directions.

AI Large Models for Absolute Beginners: Principles and API Calling in Practice
From AI's evolution to large model training principles and core concepts like Token, Temperature, and Top-P, this article explains system prompts, Function Call, RAG, and memory with hands-on examples and four API call scenarios—ideal for beginners.

Will GitHub Die? Open Source Maintainer Burnout and the Collaboration Crisis in the AI Era
Lex Fridman podcast discussion on open source maintainer burnout and GitHub's predicament: massive pull requests overwhelm core maintainers, and AI worsens code bloat. Using math journal peer review and Poincaré conjecture verification as analogies, the article analyzes why verification in knowledge production must be deliberately slow, and how open source communities can avoid the failure mode of maintainers exiting.