How Agent Harnesses Affect LLM Performance

    This article explains why the same LLM can score very differently across agent harnesses, and why the key variable is the structure of the first-turn context rather than the operating system or hardware. It breaks down what a "minimal mode" changes, traces the root cause to the tight coupling between post-training and the harness, and outlines a reproducible evaluation method with controlled variables and process metrics. It also offers practical engineering guidance and debunks common misconceptions.

    1. The Phenomenon: One Model, Two Levels of “Intelligence”

    A curious observation has been circulating in technical communities: the same LLM weights, when doing real engineering maintenance tasks inside one type of agent harness, score only in the low nineties. Switch to a so-called “minimal mode,” and the same model can repeatedly produce near-perfect scores. More importantly, this phenomenon reproduces across different operating systems, different virtualization environments, and even different hardware architectures—the score gap does not change with the platform.

    This directly overturns a common intuitive attribution: “Is one platform just more compatible?” or “Would switching distributions raise the score?” The answer is no. Only one variable is actually at work: the structure of the first-turn context, along with the tooling and prompt system built around the model.

    2. What “Minimal Mode” Actually Changes

    Minimal mode typically has three characteristics:

    1. The tool space is sharply narrowed, keeping only two basic capabilities—command execution and file read/write—while retrieval, sub-agents, memory, and other capabilities are all turned off.
    2. The system prompt is compressed to something extremely short, keeping only a single line of role definition.
    3. The interaction language style shifts from frequent first-person singular expressions toward more collaborative plural expressions.

    The third point is often misread as “the vendor secretly swapped the model.” But from an engineering standpoint, language style is an outward manifestation of the sampling distribution. The same set of weights producing different phrasing habits under different context constraints is entirely reasonable and is not sufficient evidence that the model was replaced.

    3. Root Cause: The Strong Coupling Between Post-Training and the Harness

    The real answer lies on the training side. During post-training (especially the reinforcement learning stage), a model is usually deeply bound to one specific way of composing agents: tool-call formats, the order in which context is organized, failure-retry strategies, and termination conditions all become part of the model’s policy.

    Schematically, the consistency between the training and inference environments can be understood like this:

    1. # The agent configuration during training and inference should stay isomorphic
    2. agent_config = {
    3. "tools": ["bash", "file_edit"],
    4. "system_prompt": "You are a helpful software engineer assistant.",
    5. "max_turns": 30,
    6. "context_layout": "single_turn_full",
    7. }

    Once the number of tools, prompt length, or context assembly at inference time deviates from the training distribution, the model enters an “out-of-distribution” state. The result is not that capability disappears, but that decision quality drops: the model tends to explain more, act less, and lose track of the goal more easily in long-chain tasks.

    The conclusion: the model has not become smarter—it just “recognizes its environment.” The high scores on benchmark leaderboards are essentially achieved in the exam room the model knows best.

    4. How to Verify: A Reproducible Evaluation Method

    To determine whether a capability fluctuation is a model problem or a harness problem, run controlled experiments in this order:

    • Fix the model version and sampling parameters (temperature, max output length, random seed).
    • Fix the task set, using the same batch of real engineering maintenance cases covering three categories: bug fixing, refactoring, and script writing.
    • Change only one variable at a time—the tool set, prompt length, or context organization—replacing them one by one.
    • Repeat each configuration at least three times, recording the mean and variance to avoid being misled by a single lucky high score.
    • Also record process metrics, such as average number of interaction turns, proportion of invalid tool calls, and task interruption rate.

    Process metrics are often more diagnostic than the final score. Minimal mode is usually more stable because it involves fewer interaction turns and fewer invalid calls, so the model does not have to do extra filtering through redundant information.

    5. Engineering Practice Recommendations

    For teams that want to reliably reproduce model capability, here are a few actionable principles:

    First, align the inference-time harness with the training-time setup. If the training configuration is unknown, prefer a conservative combination of “minimal viable tool set + short prompt,” then add capabilities gradually while watching for the point where degradation begins.

    Second, treat context as a limited budget. Retrieval results, conversation history, and tool returns should all be trimmed and ranked, putting the most relevant information in the first turn rather than stacking it endlessly.

    Third, build regression tests for the harness. The harness itself is code and needs version control and automated evaluation; any prompt or tool change should trigger a small-scale regression run.

    Fourth, distinguish “capability” from “environment fit.” When evaluating for selection, report the score range across multiple harnesses rather than only the best result.

    Fifth, make good use of general-purpose cloud capabilities for support. A container platform handles environment consistency, object storage holds the evaluation datasets, a message queue decouples task scheduling, and logging and monitoring/alerting services observe the interaction chain—turning evaluation into a sustainable engineering pipeline.

    6. Common Misconceptions

    • Misconception 1: Switching the operating system or virtualization solution raises the score. Debunked—the platform is not the key variable.
    • Misconception 2: A change in wording means the model was replaced. Wording is a sampling result, not a weight fingerprint.
    • Misconception 3: A higher score means a stronger model. Scores depend heavily on the consistency between the harness and the training environment.
    • Misconception 4: More tools means more power. Expanding the tool space significantly increases distribution shift and decision noise.

    7. Summary

    “Minimal mode raises scores” is not magic; it is the inevitable result of the strong coupling between the post-training environment and the inference harness. For developers, the direction worth investing in is not finding some “magic configuration,” but establishing controllability over context structure: unifying the agent composition between training and inference, fine-tuning the context budget, and bringing the harness into the regression testing system. Do these, and model capability fluctuations turn from “magic” into measurable, optimizable, and reproducible engineering metrics.