Why Coding Agent Competition Is Shifting to Harness Architecture Design

    This article explains why the performance of coding agents now depends more on the surrounding harness than on the underlying model. It breaks down two design pillars—structural composability and runtime adaptivity—shows how a reusable execution kernel can be expressed as a unified inner loop and outer loop, and lists four practical places where runtime adaptivity pays off. It closes with evaluation guidance and a suggested engineering order of work.

    Why the Focus Moved From Models to Harnesses

    Over the past two years, most of the improvement in AI coding tools came from the model side: better code comprehension, longer context windows, and more reliable tool-calling formats. But as leading models converged on tasks like code completion, defect localization, and test generation, one fact became clear: the same model placed inside a different execution framework can produce results that differ by an order of magnitude.

    The reason is that long-horizon development work is not a single question-and-answer exchange; it is the process of modifying a repository. A real task typically involves reading an issue, retrieving relevant files, forming a modification plan, editing across multiple files, running builds and tests, reading failure logs, rolling back and retrying, and finally submitting the change. In this chain, the model only decides “what to do next.” How context is assembled, how tools are exposed, how observations are fed back, and when to stop are all determined by a layer of the system that sits outside the model. That layer is usually called the harness (the execution framework or runtime shell).

    Harnesses have become thick. Several mature shapes are visible in the industry: some take a minimal-kernel-plus-extension-points route, making model adapters, tool registration, and session state replaceable plugins; some emphasize a hierarchical structure where a primary instance delegates tasks; others fold context compaction, skill loading, hook mechanisms, and permission control into one complete developer-facing system. Feature lists keep growing, but what is actually missing is not features—it is unified execution semantics: whether every new capability must have its orchestration logic written again for each topology.

    Two Core Design Pillars

    The complexity of a harness can be organized along two orthogonal dimensions.

    Structural Composability

    This means one execution kernel can be reused without loss across three scales of operation:

    • Single-instance direct run: one executor facing one task;
    • Subtask delegation: a primary instance hands a well-bounded subproblem to a subordinate executor;
    • Multi-instance collaboration: several executors advance in parallel and their results are merged.

    The key test is that “changing scale does not change semantics.” If a single instance uses one loop, delegation uses a different scheduler, and parallelism adds yet another state machine, then any underlying capability (a unified tool protocol, a unified context strategy) has to be implemented three times, and behavioral consistency cannot be guaranteed.

    Runtime Adaptivity

    This means information produced while a task is running—intermediate diagnostics, execution results, progress changes—can feed back to adjust the context, feedback, and termination conditions controlled by the framework, while the model policy stays fixed. This is often misunderstood as “letting the model rewrite its own prompt.” In practice it constrains the variables to the framework side: model weights and inference configuration do not change; what changes is the structure of the information fed in and the loop control parameters.

    Only the combination of the two satisfies both “capabilities are composable” and “the process is steerable.”

    The Execution Kernel: A Unified Abstraction of Two Nested Loops

    A reusable execution kernel can be abstracted as two nested loops.

    Inner Loop (bounded reasoning-action loop): a ReAct-style interaction with a step limit that completes “assemble context → call the model → run tools → feed observations back” within a single round. It terminates when the model produces a conclusion, is interrupted externally, or hits the step limit.

    Outer Loop (task-level advancement loop): responsible for goal decomposition, progress tracking, retry on failure, subtask dispatch, and result merging; it decides “whether to continue and who gets the next step.”

    Illustrative pseudocode:

    1. def outer_loop(goal, budget):
    2. state = State(goal=goal, plan=decompose(goal))
    3. while not state.done() and budget.left():
    4. # Runtime adaptivity: the framework adjusts, the model policy does not
    5. state.ctx = context_mgr.render(state)
    6. if state.needs_reflection():
    7. state.merge(self_reflect(state))
    8. for unit in state.next_units(): # single instance / subtask / parallel
    9. obs = inner_loop(unit, state.ctx, step_limit=K)
    10. state.absorb(unit, obs)
    11. budget.consume(state.tokens())
    12. return state.result()
    13. def inner_loop(unit, ctx, step_limit):
    14. for step in range(step_limit):
    15. action = model(ctx) # fixed policy π
    16. if action.is_final: return action.answer
    17. obs = tool_registry.run(action) # unified tool protocol
    18. ctx = ctx.append(action, obs) # observation feedback
    19. return Timeout(step)

    The value of unification is this: adding a new capability (static analysis feedback, retrieval augmentation, sandboxed execution) only requires plugging into the tool registry and the context renderer, and all three scales of operation acquire that capability automatically.

    Four Places Where Runtime Adaptivity Pays Off

    1. Context governance: long-horizon tasks inevitably overflow the window. A workable approach is layered retention—goals and constraints stay resident, plans and completed steps are summarized, raw tool output is retrieved on demand, and repeated failures are deduplicated and collapsed. The principle is “traceable,” not “retain everything.”
    2. Goal mode preservation: multi-round editing drifts easily. Make acceptance criteria explicit and checkable (build passes, specified tests pass, no new warnings), verify them at the end of every round, and forbid convergence if they are unmet.
    3. Passive feedback channel: instead of relying on the model to call a tool on its own initiative, the framework automatically triggers language services or static checks after an edit lands on disk and injects the diagnostics as observations into the next round. Compared with asking the model to “remember to check for errors,” passive feedback significantly reduces wasted iterations.
    4. Self-reflection step: insert one structured review at key points in the step or time budget, producing three categories of conclusions—verified, unverified, needs rollback—used to trim subsequent context and adjust retry strategy.

    Evaluation Criteria and Engineering Implications

    To evaluate systems of this kind, use a public, reproducible task set that has been manually verified, and state the inference tier and parallel sampling settings explicitly; when reporting results, give both a point estimate and a variance range to avoid the chance of a single run. Improvement over a baseline at the same tier usually comes from fewer wasted steps, earlier error exposure, and more stable convergence conditions—not from a stronger model.

    The order that works in engineering is: first unify the semantics of the inner and outer loops, then make tools and context pluggable components, and finally introduce passive feedback and goal verification. Baidu AI Cloud, with general capabilities such as container platforms for development scenarios, log services, and monitoring and alerting, can provide the runtime environment and observability support for this kind of execution framework.

    The conclusion is direct: the next round of differentiation will not come from model parameters, but from who can turn capability composition and execution control into one reusable set of semantics.