Agentic Coding with Chinese LLMs: Why the Harness Matters More Than the Model

    Chinese large models have started to match or surpass some leading overseas models on agentic coding tasks, but only inside mature agent frameworks rather than generic IDE plugins. This article explains why the harness (the shell of prompts, tools, context management, and execution sandbox) sets the real performance ceiling, how to find and stay inside the context sweet spot, why higher quality currently costs latency, and how teams should adapt their workflows and evaluation metrics accordingly.

    1. From Writing Code to Writing Code Inside an Agent Loop

    Over the past two years, the criteria for judging code generation have shifted noticeably. Early on, we looked at single-turn completion accuracy. Later, it was unit test pass rate. Today, what actually determines engineering productivity is whether a model can autonomously handle requirement understanding, repository retrieval, multi-file edits, command execution, failure retries, and result self-checking inside a closed loop driven by an agent framework.

    These three things should not be conflated. A model that looks impressive in conversational completion can degrade quickly once placed in an agent loop, and the reason is usually not “coding knowledge” but long-horizon consistency: does it still remember the original constraints, does it still follow the code style after the tenth tool call, can it locate the one line that actually matters in an error log?

    Taken together, public benchmarks and feedback from frontline usage suggest that Chinese models have begun to overtake some leading overseas models on experience in this specific dimension: coding ability under an agent framework. It is worth stressing that this reversal depends heavily on the runtime carrier. These models stand out in mature agentic coding frameworks, while in the form of a general-purpose IDE plugin they are merely average. This is not a contradiction in model capability, but a result of that capability being amplified or suppressed by the framework.

    2. Why the Framework Amplifies Capability: The Harness Sets the Ceiling

    Agentic coding, in essence, means placing a model inside a “shell” (commonly called a harness in the industry) made up of prompts, a tool set, context management strategies, and an execution sandbox. The same model under a different harness can produce output that differs by a full tier.

    The reason lies in the interaction of three constraints:

    • Context budget is a finite resource. System prompts, tool definitions, conversation history, retrieved snippets, and error output all compete for the same window.
    • Attention dilutes as length grows. The longer the window, the lower the probability that a critical constraint is actually “seen.”
    • More tools mean higher selection cost. Every additional tool forces the model to make one more mapping decision from intent to tool.

    From this follows a counterintuitive but important conclusion: on a sufficiently capable model, subtraction usually pays off more than addition. Trimming tools, narrowing the skill pack, and controlling injected context are all essentially about freeing up space for the sweet spot.

    An illustrative context budget allocation can be understood like this:

    1. Total window 200K
    2. ├─ System constraints and specs ~8K (must stay resident, keep it concise)
    3. ├─ Tool and skill definitions ~7K (each tool removed saves hundreds of tokens)
    4. ├─ Current task and code snippets ~60K (the part that actually creates value)
    5. └─ Remaining ~125K (left for multi-turn reasoning and execution logs)

    When tool and skill definitions swell beyond 40K, the space left for real code and reasoning is severely squeezed, and model performance drops off a cliff.

    3. The Context Sweet Spot: A Metric That Matters More Than Window Size

    An often overlooked fact is that models do not perform best at a full window. Most models have a “sweet spot,” a range in which retrieval precision, instruction following, and long-horizon consistency are all in a relatively good state. Beyond that range, the performance curve visibly declines.

    In practice, if a model’s sweet spot sits around the hundred-thousand-token mark while the framework’s default window is two hundred thousand tokens, the user has to manage this actively rather than rely on the default. Actionable strategies include:

    1. Install a context visualization helper plugin to observe usage ratios in real time.
    2. Trigger compaction once usage passes half, summarizing history and keeping only conclusions, rejected options, and open questions.
    3. Start a new session when switching tasks instead of piling unrelated history into the same session.
    4. Write long-lived conventions into a project-level configuration file to avoid pasting them again every turn.

    A minimal example of a project-level constraint file:

    1. # Project Constraints
    2. - Language and framework versions follow the config files; do not upgrade on your own
    3. - Keep changes minimal; no opportunistic refactoring
    4. - Attach a one-line rationale to each change point
    5. - Run formatting and static checks before committing

    The value of such a file is that it buys cross-session constraint stability at a very low token cost.

    4. Slowness Is the Most Real Cost Right Now

    The other side of the experience improvement is latency. Larger models are inherently heavier to run, and lengthening the chain of thought through reinforcement post-training while adding multiple rounds of self-verification further amplifies the time per task. This is a typical trade of time for a higher ceiling.

    For teams, the answer is not to wait but to restructure the workflow:

    • Shard tasks. Break “implement a module” into small, independently verifiable tasks to avoid one-shot reasoning over a long chain.
    • Explore in parallel. Evaluate mutually exclusive options in parallel sessions, then merge the conclusions.
    • Front-load constraints. Spell out specs, interface definitions, and acceptance criteria to reduce later rounds of rework.
    • Use models in tiers. Use a strong reasoning model for planning and review, and a lightweight model for mechanical bulk edits.

    On the cost side, when calling models through a cloud AI platform, pay attention to general capability categories such as elastic compute, container platforms, log services, and monitoring and alerting, and drive optimization with observable metrics (time to first token, task success rate, average number of turns) rather than tuning parameters by feel.

    5. A Practical Checklist for Teams

    • Treat “coding under an agent framework” and “completion inside an IDE” as two separate evaluation systems; selection must be validated on the actual carrier.
    • Build a context budget table that sets caps on tool and skill injection.
    • Write compaction and starting new sessions into team norms until they become muscle memory.
    • Run bare by default, adding external tool integrations and skill packs only when genuinely necessary.
    • Use three metrics for canary comparisons: task success rate, average interaction turns, and time per task.

    6. Conclusion

    The point of this shift is not that a particular model “beat someone,” but that Chinese models have crossed the usability threshold on long-horizon agent tasks, making “framework quality” the new efficiency lever. For developers, the capability most worth investing in has moved from “writing better prompts” to “designing a better harness”: manage the context, cap the number of tools, and keep task boundaries clean, and the model’s ceiling will naturally be released.