AI Coding Tools: Model Capability Sets the Floor, Agent Engineering Multiplies It

    This article breaks down why AI coding tools perform the way they do by separating three distinct layers: raw code generation, runtime governance, and long-task state management. It argues that the underlying model determines the capability floor, while agent engineering determines whether that floor translates into a real delivery, making the two multiplicative rather than additive. You will learn how a three-tier permission model, default fallback modes, pre-execution hooks, externalized project constraints, and checkpoint boundaries work in practice, plus how lenient tool adapters can distort perceived model quality. The article closes with a practical evaluation and implementation checklist.

    1. First, Unpack “Strong”: A Blurry Question Has No Answer

    Asking whether an AI coding tool is strong because of its underlying model or because of its agent implementation details easily turns into taking sides. The reason is that “strong” is a composite concept that compresses three fundamentally different properties into one word: whether the tool can write correct code, whether the changes it produces can be safely applied to a workspace, and whether a long task can run all the way to delivery. These three things are governed respectively by model capability, runtime governance, and state management. Discussing them together makes any conclusion sound like a defense of one side.

    A more reasonable approach is to establish a layered view first, then argue layer by layer. The overall judgment of this article is: the model determines the floor, and agent engineering determines whether that floor can be cashed out as a real delivery. The two are not additive but multiplicative—if either one is zero, the result is zero.

    2. Layer One: Can It Write Code? The Model Sets the Capability Floor

    The first layer is pure generation capability: understanding requirements, locating relevant files, grasping existing conventions, and producing code that compiles and passes tests. This capability comes from what was accumulated during pre-training and reinforcement learning, and it is largely independent of the outer runtime framework.

    A counterexample makes the point. Hand the same repository to a noticeably weaker model, and it may fail to understand the intent of a test case at all—unable to tell which assertion is a core constraint and which is only an auxiliary check. At that point, discussing sandbox isolation, approval flows, or rollback mechanisms is meaningless, because there is no output worth governing. So we have to acknowledge that the model is the prerequisite; there is no need to avoid this.

    The engineering implication is that when evaluating AI coding tools, the first step is always to fix the task set, change only the model, and observe how pass rate and rework rate shift. If swapping the model produces a far larger difference than swapping the framework, the current bottleneck is in the generation layer, and investing in the governance layer is a misallocation.

    3. Layer Two: Can Changes Land Safely? Runtime Governance Is Its Own Engineering Problem

    The second layer concerns whether changes can be written to the workspace and executed safely. This layer has nothing to do with model intelligence; it is the responsibility of runtime governance (the harness). Abstracted out, it forms a clear rule-table structure.

    3.1 A Three-Tier Permission Model

    A common industry implementation splits tool-call permissions into three groups: allow, ask, and deny. Rules are usually written as “tool name + parameter pattern,” with prefix matching on the parameter side and wildcards permitted only at the end to avoid semantic ambiguity. For example:

    1. allow: Bash(npm run test:*) read-only and build commands run without confirmation
    2. ask: Bash(git push:*) affects remote state, confirm each time
    3. deny: Read(./.env) sensitive files are rejected outright

    Priority is hard-coded: ask overrides allow, and deny overrides both. This fixed “deny > ask > allow” ordering matters because it makes security semantics independent of the order in which rules are written, reducing accidental allowances caused by configuration mistakes.

    3.2 Default Mode as a Fallback

    Rules cannot enumerate every possible call. So when no rule matches, execution falls back to a default mode. A stricter option is plan mode: only reading and analysis are allowed, file modification is not, and commands with side effects cannot run. Its value is that it separates exploration from writing in time, letting a human step in and correct course at the lowest-cost stage.

    3.3 Pre-Execution Hooks

    After tool arguments are generated and before actual execution, a pre-execution hook can be inserted. When the hook returns a non-zero exit code, the framework aborts the call and feeds the standard error content back to the model verbatim, so it can fix its arguments or take another path on its own. This is an extremely low-cost loop: no retraining is needed and no human intervention is required, because the model sees the failure reason in the next round.

    It is worth stressing that these mechanisms do not make the model smarter. Their job is to compress the error space of “runs but heads in the wrong direction”—deleting the wrong directory, modifying the wrong interface, or loosening a test assertion just to get a pass. These are exactly the errors that generation capability cannot constrain on its own.

    4. Layer Three: Can Long Tasks Finish? The State Layer and External Constraints

    The third layer is state management. Real repository-level tasks often span dozens of interaction rounds, and context compaction is lossy. What gets dropped first is usually the earliest content: which files must not be touched, which interface signature must not change, which database migration must stay backward compatible. These constraints are written at the beginning but only used in the middle and later stages. Once compacted away, the model “forgets” the boundaries and makes changes that look reasonable but actually overstep.

    So the common industry practice is to move constraints out of the context: a documentation file at the repository root carries project conventions, build commands, and prohibited actions. The file lives on disk, compaction cannot touch it, and it can be re-read every round. This is a classic approach of using external storage to counter a limited window, and it shares the same roots as writing long-term memory to external storage and retrieving it on demand.

    The checkpoint mechanism is also often mistaken for a replacement for version control. A typical implementation snapshots internal files before each turn begins and keeps only the most recent few within a session (commonly around one hundred). Files modified purely through the command line are usually not tracked, and the changes of most subtasks are not tracked either. Its role is fast session-level recovery, not commit history or collaborative review. It is cheap because it covers only file contents, not external side effects—requests already sent and data already written to a remote system cannot be rolled back. Understanding this boundary is what prevents misjudging the recoverable scope during an incident review.

    5. The Reverse Effect: Tools Shape the Model, Creating a False Sense of “a Stronger Model”

    More interesting is the reverse chain: runtime tools shape model behavior in return, leading people to misjudge changes in model capability.

    One widely discussed phenomenon is that connecting the same batch of new models to a custom editing tool leads to worse tool-call quality—the argument JSON contains extra fields that do not exist, the content itself is correct, there are just keys that should not be there. A credible explanation is a mismatch between the training environment and the inference environment: the model completed reinforcement learning in a lenient client, and a lenient client does not strictly validate the schema, automatically filters unknown keys, and accepts multiple synonymous parameter names at the same time. As a result, “writing a few extra fields” still earns a reward, and no gradient corrects the bad habit. Once switched to a tool with strict validation, the call fails outright.

    This mechanism is a reasonable inference rather than a conclusion everyone can reproduce, but the engineering lesson it gives is certain: strict validation, explicit errors, and feeding the raw error back are both a runtime security requirement and a necessary condition for model behavior to converge. A lenient adapter layer raises the success rate in the short term but hardens non-standard calling habits over the long term.

    6. Conclusion and Practical Recommendations

    Back to the original question: the model determines the floor, agent engineering determines whether the floor can be cashed out, and the two are multiplicative. In practice, proceed in this order:

    • Fix the task set and evaluation criteria first, change only the model, and determine whether the bottleneck is in the generation layer or the governance layer;
    • Constrain writes and execution with a rule table of “allow / ask / deny + default mode,” with priority hard-coded rather than order-dependent;
    • Build a low-cost correction loop with pre-execution hooks, handing the failure reason to the model verbatim;
    • Put long-term constraints in an in-repository documentation file so they are not dropped by context compaction;
    • Be clear about the checkpoint boundary: it restores files only, not external side effects, so critical operations still go through version control and remote backups;
    • Validate tool arguments strictly to avoid a lenient adapter hardening bad calling habits.

    When deploying in the cloud, these capabilities are typically carried by container platforms for the runtime environment, by logging services and monitoring alerts for observability, and by object storage for snapshots and artifacts. These are general-purpose capability combinations rather than exclusive features of any single solution. Baidu AI Cloud likewise offers such general infrastructure as standard capability categories, and the actual selection should still be based on your own task-set evaluation results.