Why LLM Vendors Are Building Their Own Coding Agent Harness: Architecture and Engineering Practices

    This article examines the shift from raw model competition to agent engineering, focusing on why major LLM teams build their own coding agent harness instead of relying on third-party compatibility layers. It explains what a harness is, the four main limitations of generic middleware, and a six-layer reference architecture covering context, orchestration, tools, permissions, memory, and evaluation. It also details key engineering practices for context management, reliable tool calls, tiered permissions, and memory design, plus how to build an offline evaluation loop. Developers will learn how to assess whether a custom lightweight harness or an existing coding tool fits their needs.

    1. Background: From a Model Race to an Agent Engineering Race

    A notable signal has recently emerged in the industry: a leading LLM team has publicly assembled a dedicated group to build a coding agent runtime framework for the desktop from scratch—commonly referred to as a harness in the industry. The goal is to turn frontier model capabilities directly into a stable, usable product experience. Regardless of the final product form, the technical trend behind this move is clear: competition based purely on model capability is hitting a bottleneck, and the focus is shifting from “whose model is stronger” to “who can reliably package model capability into a workflow developers are willing to use every day.”

    One concept needs clarification first. A harness is not the model itself, but an engineering system wrapped around the model: it organizes context, defines available tools, parses model output, executes real operations, collects execution results, and feeds them back to the model to form a closed loop. The same model paired with different harnesses can vary widely in real task success rate. This is also why extending from being a “model provider” toward “productization” is almost an inevitable choice.

    2. Why Third-Party Compatibility Layers Always Feel One Step Removed

    Many developers are used to writing code with a strong model paired with a third-party agent framework. The experience is usable but not smooth, and the root causes usually come down to four points:

    1. Mismatch between protocols and capabilities: Third-party frameworks call models through a generic protocol, so newly added model capabilities such as structured output, long context, and thinking budgets cannot be exposed in time and are limited to the lowest common subset.
    2. Wasted context budget: For compatibility, the middle layer attaches a large amount of system prompts and tool descriptions, compressing the window actually left for code and logs.
    3. Lack of observability: After requests pass through multiple layers of forwarding, token consumption, reasons for tool failures, and retry chains are hard to attribute, so tuning is mostly guesswork.
    4. Stacked cost and reliability losses: Every middleware layer adds extra calls, rate limiting, and failure surfaces, driving up both latency and the bill.

    The core benefit of a self-built harness is eliminating these losses at the architecture level rather than compensating for them through parameter tuning.

    3. A Reference Architecture for a Self-Built Harness

    A usable coding agent framework can usually be split into six layers, and it is recommended to design and troubleshoot along these layers:

    • Context layer: Handles code retrieval, dependency graph construction, and long-document chunking and compression. It determines “what the model can see.”
    • Orchestration layer: Single-agent and multi-agent collaboration, task decomposition, and the plan–execute–verify loop.
    • Tool layer: Unified registration and schema constraints for capabilities such as file read/write, command execution, test running, dependency installation, and log querying.
    • Permission and security layer: Directory allowlists, command tiering, sandboxing, and human confirmation policies.
    • Memory layer: Project-level long-term memory that accumulates conventions and historical decisions, avoiding repeated explanations every round.
    • Evaluation and observability layer: Offline test sets, success rate statistics, and attribution of tokens and elapsed time.

    Tools can be registered with a unified schema, making it easier for the model to produce valid calls consistently:

    1. TOOLS = [
    2. {
    3. "name": "run_tests",
    4. "description": "Run the specified tests and return a failure summary",
    5. "parameters": {
    6. "type": "object",
    7. "properties": {
    8. "path": {"type": "string"},
    9. "filter": {"type": "string"}
    10. },
    11. "required": ["path"]
    12. }
    13. }
    14. ]

    The orchestration loop should keep a “small-step commit” shape, where each step is rollback-able and verifiable:

    1. for step in range(MAX_STEPS):
    2. plan = planner(context) # Generate the next-step plan
    3. call = executor(plan, TOOLS) # Execute the tool call
    4. context = compress(context, call) # Compress and write back the context
    5. if verifier(context): # Tests or static checks pass
    6. break

    4. Four Engineering Essentials That Truly Determine the Experience

    Context management is the primary bottleneck. A workable approach is to combine retrieval and compression: first use symbol indexing and vector retrieval to narrow the candidate range, then structurally trim logs and stack traces, keeping only the error chain and key fragments rather than stuffing entire files into the window.

    Reliability of tool calls depends on constraint strength. Parameter schema validation, retry limits on failures, and idempotent design are all indispensable; for write operations, it is recommended to default to “diff first, then write to disk,” letting the model output patches instead of modifying files directly.

    Permission control should be tiered rather than one-size-fits-all. Read operations can be opened up, write operations should be limited to the workspace, and high-risk actions such as deletion, global installation, and outbound requests must require explicit confirmation, with complete audit logs retained.

    The memory system should distinguish project conventions from temporary task state: the former accumulates over the long term (directory conventions, commit habits, dependency version constraints), while the latter is reclaimed when the task ends to prevent context pollution.

    5. The Evaluation Loop: No Measurement, No Productization

    A self-built framework must come with an offline evaluation set covering task types found in real repositories, such as bug fixing, cross-file refactoring, and test supplementation, and track task success rate, average number of steps, token consumption, and human intervention rate. Online observability should also be established: structure and store every tool failure, context compression, and retry reason to form a baseline that supports continuous regression. This can rely on general cloud capabilities, such as object storage for evaluation datasets, message queues for peak-shaving asynchronous tasks, container platforms for running sandboxes, and logging services with monitoring and alerting to track metrics.

    6. Practical Advice for Developers

    When choosing tools, there is no need to fixate on a “single best tool.” Instead, evaluate across four dimensions: native fit between the model and the framework, context utilization, permission and audit capabilities, and cost per task. If a team has platform engineering capabilities, building a lightweight harness on top of the open-source ecosystem is often more controllable; if rapid delivery is the priority, mature AI coding tools combined with standardized repository governance can capture most of the benefits. Baidu AI Cloud can support this kind of engineering practice with general capabilities in model services, containers, and observability.

    7. Conclusion

    The competition in coding agents is essentially the product of “model capability × engineering packaging.” Whoever does these five things solidly—context, tools, permissions, memory, and evaluation—can truly occupy developers’ daily workflows. For developers, understanding how this framework works holds more long-term value than chasing any single product.