Why Model and Framework Combinations Matter in the Agent Era

    A controlled experiment shows that keeping the same model but swapping the agent harness can more than double Pass@1 on repository-level coding benchmarks, while framework rankings across two models show almost no correlation. This article explains why coding agent capability is a joint property of model and harness, how token consumption reveals that most compute goes into finding code rather than writing it, and how to build a two-dimensional evaluation matrix. It also covers engineering optimization priorities, starting with context retrieval efficiency and verification loops before considering a model switch.

    Why Model and Framework Combinations Matter in the Agent Era

    1. A Fact Hidden by Single Leaderboards: Swap the Shell, Double the Score

    A recent set of controlled experiments is worth revisiting. With the same model and only the surrounding agent execution framework (harness) replaced, Pass@1 on a real repository-level coding benchmark rose from 23% to 52%. A smaller model improved from 15% to 36%. Even more counterintuitive, when the performance rankings of 10 harnesses across the two models were correlated, the coefficient was about -0.05, essentially no relationship at all.

    The impact of this data is not the conclusion that “frameworks matter.” It directly undermines the legitimacy of mainstream evaluation. We are used to treating leaderboard scores as inherent properties of a model, but the experiments show that a score is a joint property of the pair “model × framework.” A framework that ranks near the top on model A may fall to last place on model B. As a result, any coding capability score that does not specify the harness is incomplete.

    2. Breaking Down the Structure: The Model Is the Brain, the Framework Is Everything Else

    Writing a coding agent system as an equation makes it clearer:

    1. CodingAgent = Model + Harness

    The model handles reasoning and generation; it is the “brain.” The framework handles everything outside the brain: the eyes (how the repository is observed), the hands (how modifications are applied), the workbench (sandbox and dependency environment), the memory system (context and history compression), the workflow (when to retrieve, when to verify), and the project manager (task decomposition and termination decisions).

    Faced with a repository-level defect, the model alone cannot truly “open the repository, search the code, read files, modify the implementation, run tests, read errors, modify again, check the diff, and confirm the fix.” The framework is what chains these actions into a closed loop. The framework is therefore not a UI shell; it determines how much of the model’s intelligence is actually released.

    3. Cost Structure Reveals the Truth: Tokens Are Spent Mainly on “Finding,” Not “Writing”

    More convincing evidence comes from the distribution of token consumption. Exploratory research shows that under a typical lightweight agent configuration, about 76.1% of the model’s tokens are spent on read operations; with a different model, the ratio is still about 67.5%. In other words, most of the compute budget is not spent on producing the final code, but on reading, locating, and exploring the codebase.

    This reframes the problem: how context is acquired is itself a core component of coding agent capability. Whoever can find the right few pieces of code with fewer tokens has already won half the battle.

    4. Why Framework Differences Are Amplified: The Multiplicative Effect of Errors

    Differences in single-step accuracy are amplified exponentially across multiple chained steps. If the single-step success rate is p, the probability that 20 consecutive steps are all correct is roughly p to the 20th power: about 0.36 when p=0.95, and about 0.12 when p=0.90. The framework determines the number of steps and the “recoverability” of each step, making it the easiest link to gain in this multiplicative chain.

    At the same time, models and frameworks are strongly coupled. A model’s context window, instruction-following style, tool-call format preferences, and stability over long histories can make one framework excel on it while failing on another. A ranking correlation near zero is precisely a quantified measure of that coupling strength.

    5. A Practical Combination Evaluation Method

    Stop asking “which model is the strongest” and instead build your own evaluation matrix following the process below:

    1. Fix the task set: use real repository-level defects covering different languages, sizes, and dependency complexity.
    2. Two-dimensional matrix: run models × frameworks and output a matrix rather than a single ranking.
    3. Record costs: track token consumption, read ratio, number of steps, wall-clock time, and failure types.
    4. Multiple samples: Pass@1 requires averaging over multiple independent runs to avoid single-run chance.
    5. Attribution analysis: break failures into four categories: wrong location, wrong patch, missing verification, and truncation.

    An illustrative evaluation checklist structure:

    1. matrix:
    2. models: [modelA, modelB]
    3. harnesses: [harness1, harness2, harness3]
    4. metrics:
    5. pass_at_1: true
    6. token_total: true
    7. read_token_ratio: true
    8. steps: true
    9. failure_tags: [locate, patch, verify, truncated]
    10. repeats: 3

    6. Engineering Optimization Priorities

    Based on the cost distribution, the optimization order should be: first improve context acquisition, then improve the verification loop, and only then consider switching models. Specific practices include: replacing blind full-text reading with structured retrieval and symbol indexing; applying layered compression to history, keeping decisions and diffs while discarding redundant logs; making tests and static checks a mandatory closed loop so that “find an error, then fix it” happens automatically; designing explicit retries and fallbacks for tool-call failures; and setting budget caps to avoid unlimited consumption on wrong paths.

    For cloud deployment, container platforms can provide isolated sandboxes and dependency environments, object storage can hold repository snapshots and artifacts, logging services and monitoring alerts can observe token and step metrics, and message queues can schedule concurrent evaluation tasks. These are general capability categories and do not point to any specific product.

    7. Conclusion

    The real capability of a coding agent is a combination property. Evaluation must be upgraded to a two-dimensional matrix, and optimization must start with “context acquisition efficiency” and “verification loop completeness.” When read consumption accounts for 70% of the budget, whoever makes “finding code” cheaper and more accurate holds the decisive advantage in this generation of agentic coding.