Why LLM Performance Is So Sensitive to the Tool Environment
This article explains why the same model can score very differently under different agent harnesses, and breaks the harness into four measurable layers: tools, instructions, extensions, and feedback. It analyzes four causes of the gap—candidate action space and selection entropy, constraint dilution in long prompts, first-turn trajectory anchoring, and potential overfitting to post-training distributions—then outlines neutral testing methods, a more reproducible evaluation design, and engineering practices for stable production agents. Readers will learn how to make benchmark results comparable and how to design more robust tool environments.
1. The Setup: Same Model, Different Harness, Very Different Scores
In evaluations of coding and AI Agent capabilities, the community keeps observing the same thing: with identical model weights and an identical task set, simply swapping the outer runtime harness—the way tools, system prompts, plugins, and protocol descriptions are organized—can produce a visible gap in the final score.
A typical observation can be abstracted as follows (the numbers only illustrate the trend and do not represent any specific product):
Harness A (standard mode, ~25 tools + full schema + plugin descriptions) -> 91 / 92Harness B (advanced orchestration mode) -> 92Harness C (minimal mode, only shell and read exposed) -> 99 / 96Harness D (minimal first, full tools injected after the first call) -> 98 / 99
The most counterintuitive result is Harness D. If the bottleneck were really just “too many tools make selection hard,” then restoring all 25 tools in the second turn should have dragged the score back down to Harness A’s level. It did not. That detail is the starting point of this entire discussion.
2. Neutral Abstraction First: Breaking the “Harness” Into Measurable Variables
To discuss this rigorously, the first step is to split the vague notion of “environment differences” into variables that can be controlled independently. An agent runtime harness is typically made up of four layers:
- Tool layer: number of tools, naming style, nesting depth of parameter schemas, ratio of required fields, size of enum value sets.
- Instruction layer: system prompt length, number of constraints, output format requirements, number of examples (few-shot).
- Extension layer: descriptive text for plugins, skill packs, and external protocol integrations, often concatenated into the context as a “list of available capabilities.”
- Feedback layer: truncation policy for tool return values, wording of error messages, retry hints, context compression approach.
Together these four layers determine what the model “sees” at step one. Putting them into a comparison table is the prerequisite for every experiment that follows:
| Variable | Minimal mode | Standard mode | Direct impact on the model |
|---|---|---|---|
| Number of tools | 2 | ~25 | Size of the candidate action space |
| Schema depth | Shallow | Deep | Parameter construction failure rate |
| Instruction length | Short | Long | Probability that key constraints get diluted |
| Extension descriptions | None | Present | Degree to which attention is dispersed |
3. Cause One: Candidate Action Space and “Selection Entropy”
Increasing the number of tools essentially expands the choice space for the next action from “two small options” to “twenty-plus candidates.” Even with unchanged model capability, the probability of a wrong choice rises with the number of candidates. A minimal model helps build intuition:
# Illustration: a rough upper bound on single-step selection accuracydef step_accuracy(model_skill: float, num_tools: int) -> float:# A model_skill closer to 1 means the model "understands" the task better# More candidates means more loss introduced at the selection stepreturn model_skill / (1 + 0.02 * (num_tools - 2))print(step_accuracy(0.99, 2)) # 0.99print(step_accuracy(0.99, 25)) # ~0.83
This formula is not precise, but it explains a long-standing engineering rule of thumb: shrinking the action space is often more cost-effective than switching to a stronger model. In multi-step tasks, the gap between 0.83 and 0.99 at a single step gets amplified exponentially, and this is the first reason the standard mode and the minimal mode pull apart.
4. Cause Two: Constraint Dilution in Long Instructions
Standard mode usually comes with a large block of system prompt, plugin lists, and protocol descriptions. Key constraints (for example, “read before write” or “do not repeatedly create files”) get buried in the middle of hundreds of lines of text, and their effective weight is diluted. Mitigation practices widely used in the industry include:
- Moving hard constraints to the top of the instructions and expressing them in short sentences and numbered lists;
- Separating the “capability list” from the system prompt and injecting it only after on-demand retrieval;
- Layering tool descriptions: give the name and a one-line purpose first, and expand the full schema only when the model clearly needs it.
The third point is especially important, because it corresponds to the general design principle of progressive disclosure: context is not filled all at once, but unfolds gradually as the task progresses.
5. Cause Three: The First Turn Determines the Subsequent “Working Mode”
The Harness D result points to a deeper explanation: the model is highly sensitive to the trajectory shape of the opening few turns.
When only two tools are exposed in the first turn, the model enters a plain loop of “explore—read—reason—act.” Once that loop is established, even if the full tool set returns later, the model still tends to reuse the same behavioral template rather than performing a fresh global tool evaluation. In prompt engineering this is called the “anchoring effect,” and its mechanism can be roughly written as:
shape of the first-turn context -> activates a behavioral template from some training distribution -> later turns reinforce it
The engineering implication is direct: the “shape” of the first-turn context is more decisive than all subsequent supplementary instructions combined. So instead of appending a note in turn three saying “please note you still have many tools available,” it is better to spell out tool partitions, usage priority, and termination conditions in the first turn.
6. Cause Four: Potential Overfitting From the Post-Training Distribution
If a certain minimal harness was used frequently during the training stage, the model may form a strong association with the trajectory shape of “only a few tools at the start,” showing up as: quickly entering an efficient state upon seeing a similar opening; and, conversely, tentative calls, repeated reads, and wrong tool selections when facing a complex opening.
It is worth stressing that this is a distributional tendency, which does not mean the model’s capability has degraded, nor does it constitute any judgment about a specific product. Three general methods can be used to check whether such overfitting exists:
- Shape randomization: randomize tool naming, description order, and prompt length on the same task, and observe the variance in scores.
- First-turn permutation: fix the task, change only the subset of tools exposed in the first turn, and measure how strongly the subsequent behavioral template transfers.
- Capability decoupling: report “task reasoning accuracy” and “tool call accuracy” separately to determine whether the loss comes from reasoning or from selection.
If the variance mainly comes from “call accuracy” in item 3, the problem is concentrated in environment adaptation rather than model intelligence, and the optimization focus should be on harness design.
7. A More Robust Evaluation Design: Comparable and Reproducible Scores
For evaluation conclusions to hold up, it helps to fix the evaluation workflow into four steps:
- Fix the task set and the judging script: results are determined programmatically, avoiding subjective human scoring.
- Version the harness: change only one variable at a time, and record the version number and configuration differences.
- Repeat multiple times and report confidence intervals: a single run is not a conclusion; report at least the mean and the range of variation.
- Report in layers: give end-to-end pass rate, single-step tool selection accuracy, average number of steps, and invalid call rate separately.
An example of a minimal viable report structure:
run:task_suite: v3harness_version: minimal-2toolsrepeats: 5metrics:end_to_end_pass: 0.96tool_selection_accuracy: 0.98avg_steps: 4.2invalid_calls: 0.01
With this table, “did the model get stronger or did the harness get friendlier” no longer has to be judged by feeling.
8. Engineering Practice: Stability Strategies for Real Business
In enterprise coding scenarios, stability takes priority over peak scores. Five actionable practices:
- Tool convergence: split agents by business domain, keep the number of tools exposed by a single agent in the single digits, and route across domains through an orchestration layer.
- Schema simplification: reduce deep nesting and overly long enums, and put validation on the server side rather than in the prompt.
- Fixed first-turn templates: accumulate validated opening-context templates for high-frequency tasks and bring them under version control.
- Complete observability: with logging services, monitoring alerts, and distributed tracing, track tool call success rates and the distribution of parameter validation failure reasons.
- Elastic resource capacity: batch evaluations and regression tasks can run on a container platform, with object storage holding trajectory samples for review and dataset accumulation.
If general-purpose cloud capabilities are used, a typical combination is: a container platform hosting the evaluation executor, object storage archiving trajectories and reports, a message queue smoothing out and scheduling batch tasks, and a logging and monitoring system handling metric collection and anomaly alerts. These are all general industry categories, and the specific implementation can be chosen according to your own architecture.
9. Conclusion
“The minimal mode scores higher” is not mysterious; it is the combined result of action space size, instruction constraint dilution, first-turn trajectory anchoring, and training distribution tendency. For developers, the real takeaway is not to chase a high score from some particular harness, but to master a reproducible evaluation method and a set of converging environment design principles: shrink the choice space, front-load hard constraints, fix first-turn templates, and report metrics in layers. With these four points in place, evaluating model capability turns from “depending on luck” into “depending on data,” and agents can deliver reliably in real business.
