AI Coding Agent Architectures: Developer-Controlled vs. AI-Controlled Design

    This article examines two architectural approaches for AI coding agents: a static, developer-controlled framework with predefined roles and separated planning/execution agents, and a dynamic, AI-controlled multi-agent system in which the main agent generates subagents and workflows on demand. It compares the two routes across controllability, flexibility, token cost, auditability, and task fit, and offers practical selection guidance for engineering teams.

    AI Coding Agent Architectures: Developer-Controlled vs. AI-Controlled Design

    1. The Core Question: Who Holds Decision-Making Control?

    There are currently two distinct technical routes in intelligent coding tools. Their main difference is not model capability, but a more fundamental architectural question: who should hold final decision-making authority over the task?

    Route one: control belongs to the developer. The large model is treated only as a relatively capable “code generator,” wrapped by an independent, often fully open-source governance and orchestration system. This orchestration system acts like a strict project manager. It defines when the model may think, when it may act, and how to roll back and correct errors during execution. The model itself has no autonomous decision-making power. Every step is precisely controlled by the developer within the framework’s constraints.

    Route two: control belongs to the AI. The large model is treated as the “brain” of the entire system and is directly equipped with an execution toolchain—essentially giving the brain hands and feet. When to read code, when to write code, and when to stop and think are all decided by the model itself based on the current goal. The system structure is very simple: one brain plus a fixed set of tools, with no separate external orchestrator.

    Neither route is inherently superior. Each pushes a different property to its limit: controllability and flexibility. The following sections break down their typical architectural designs.

    2. Fixed-Role Dual Primary-Agent Architecture: The Extreme of Controllability

    The most representative design in the first route is a dual primary-agent structure with predefined roles, plus lightweight subagents. Its core innovation is separating “thinking” and “doing” into two completely independent agent processes:

    • Plan agent (planning side): It holds only read-only permissions and is responsible for reading the codebase, analyzing the architecture, and producing an implementation plan. It has no write permission on the file system, which mechanically prevents “plan contamination” caused by changing code while still thinking.
    • Build agent (execution side): It holds only execution permissions and strictly implements the plan produced by the Plan agent—writing code, running tests, and submitting results. It has no authority to change the plan itself. If it finds a problem with the plan, it can only provide feedback, not make unilateral changes.

    The two agents exchange information through the file system. The planning output is a structured document, and execution results and test reports are also written back to disk. Users can intervene at any stage: interrupt execution, modify the plan, and restart. This is especially important for engineering teams, because “requirements changing midway” is normal in real development.

    This design—where all roles are predefined and cannot be generated dynamically—brings clear benefits and costs:

    Benefits:

    • Behavior is highly predictable, permission boundaries are clear, and auditing and risk control are easier to implement.
    • When problems occur, the diagnosis path is clear: was the plan wrong or the execution wrong?
    • It is well suited to scenarios with high change-safety requirements, such as enterprise core codebases and compliance-sensitive repositories.

    Drawbacks:

    • Flexibility is poor. Task forms not covered by predefined workflows can be constrained.
    • Every task must go through the fixed pipeline of “plan first, execute later,” making simple tasks feel heavy.
    • Once planning and execution are separated, the execution side lacks freedom to explore and may repeatedly ask for guidance on detailed issues.

    The following pseudocode illustrates this static orchestration:

    1. plan = PlanAgent.analyze(repo) # read-only, outputs plan document
    2. user_review(plan) # user can interrupt or modify
    3. result = BuildAgent.execute(plan) # execute only, no plan changes
    4. report = BuildAgent.test(result) # write results back to disk

    3. Dynamically Generated Multi-Agent Architecture: The Extreme of Flexibility

    The representative evolution of the second route gives the model itself the power to orchestrate multiple agents. Recent version updates have generally introduced “dynamic workflow” capabilities, with an architecture that can be summarized in three layers:

    1. Single main-agent default mode. In normal operation, the system has only one general-purpose main agent that plans and executes by itself. For most small and medium tasks, this mode has the lowest overhead and fastest response. There is no need to spin up a multi-agent system for a simple refactor.

    2. On-demand dynamic subagent generation. For complex tasks, the main agent writes code to create specialized subagents. The key point is that each subagent has an independent context window and independent tool permissions. For example, one subagent may only handle retrieval and localization in a large codebase, while another may only run security scans. They do not pollute each other’s context. This effectively alleviates context bloat in long tasks.

    3. Dynamic workflow orchestration. The main agent can even write code to define how subagents collaborate—whether through serial relay, parallel scanning followed by merging, or multi-proposal voting—entirely decided on the spot by the model based on task characteristics.

    The technical characteristic of this approach is that there are no predefined roles in the system. All agents are tailor-made for the current task.

    Benefits:

    • Extremely flexible; it can handle various nonstandard, cross-domain complex problems.
    • Context isolation makes accuracy more stable in long-chain tasks.
    • Collaboration topology changes with the task, so in theory there is no “scenario not covered by the workflow.”

    Drawbacks:

    • It lacks structural constraints. Sometimes it generates unnecessarily complex agent structures, wasting tokens and waiting time.
    • Behavior predictability is poor, and debugging and auditing costs are high.
    • It relies heavily on the model’s planning ability—if the model is weak, the whole system is weak.

    4. Selection Guidance: Match the Scenario, Not Pick a Single Winner

    From an engineering-practice perspective, selection between the two routes can be reduced to several judgment dimensions:

    Dimension Static control framework route Dynamically generated agent route
    Behavioral controllability High; permissions and workflows are fixed Low; depends on model self-discipline
    Flexibility Low Extremely high
    Token cost Relatively predictable May expand due to excessive orchestration
    Suitable tasks Clear workflows, risk-sensitive Exploratory, highly variable
    Auditing and compliance Easy Difficult

    Specific recommendations for teams:

    1. For core production codebases, prioritize the static control route, enforce separation of planning and execution, and ensure every change is traceable.
    2. For exploratory tasks—prototype validation, difficult bug localization, and cross-module investigation—the dynamically generated route delivers greater benefits.
    3. Regardless of the route, establish a principle of least privilege and human checkpoint mechanisms: persist planning artifacts for human review and require confirmation before high-risk operations.
    4. Monitor token costs and set an “orchestration complexity cap” for multi-agent architectures to prevent the model from making the system increasingly heavy.

    5. Final Thoughts

    The debate over agent architecture is essentially a reappearance of a classic software engineering question: centralized control or autonomous self-governance. The control-framework route inherits the rigorous philosophy of traditional CI/CD pipelines, while the dynamic-generation route pushes the “Software 2.0” idea to its limit—using code to generate code and agents to orchestrate agents. It is reasonable to expect that future mature intelligent coding systems will combine both: dynamic generation for solution coverage, and static constraints to safeguard security and cost baselines. For developers, understanding the design trade-offs of these two architectures has more long-term value than rushing to choose a specific tool.