Papers
Topics
Authors
Recent
Search
2000 character limit reached

An Empirical Study of Harness Design for Coding Agents

Published 17 Sep 2026 in cs.AI, cs.CL, cs.LG, and cs.SE | (2609.20804v1)

Abstract: Coding harnesses shape how autonomous coding agents translate model capabilities into long-horizon software-engineering performance, yet existing work typically evaluates harnesses as monolithic systems, leaving the effectiveness of individual components unclear. To enable component-level comparisons, we study this question with a lightweight coding harness whose execution loop is fixed while three components are varied: planning, action space, and context management. Across four models evaluated on SWE-Bench Verified and Terminal-Bench 2.1, we evaluate 176 matched settings spanning five context-management strategies, four context-window budgets, and targeted ablations of planning and action space. We find that: (1) Context management becomes increasingly valuable as the context-window budget tightens, with most of its benefit coming from preventing context-overflow failures. (2) Staging rule-based elision before LLM-based summarization provides the strongest overall efficiency among the context-management strategies, whereas making elided content recoverable adds machinery that models rarely use and yields no accuracy gain. (3) Planning shifts from an accuracy scaffold for weaker models to a cost saver for stronger models, with little change in accuracy. (4) Predefined tools improve performance for models with weaker bash proficiency, whereas bash-capable models can operate effectively with a bash-only interface and achieve substantially lower cost, especially on command-line-centric tasks. Trajectory-level analysis explains these effects: context management extends execution trajectories without substantially altering agent behavior, planning changes where trajectories stop, and the action space changes the granularity at which code is written. These findings inform model- and budget-aware harness design and provide a modular framework for evaluating future harness components.

Summary

  • The paper evaluates 176 matched harness configurations across four models and two coding benchmarks, showing that context management delivers its largest success gains under tight context limits by preventing overflow-related termination.
  • The paper finds that planning improves weaker models’ success by sustaining trajectories, while reducing stronger models’ inference costs by limiting redundant verification; its effects vary by model capability and task type.
  • The paper demonstrates a capability crossover in action interfaces: structured tools help models with weak shell control, whereas bash-only access can reduce costs and improve results for stronger, shell-proficient models.

Study objective and experimental design

The paper investigates coding harness design as a component-level systems problem. Its central premise is that coding-agent performance cannot be attributed to the underlying LLM alone: planning, action interfaces, and context management mediate how model capabilities are expressed during long-horizon software-engineering tasks. Existing evaluations commonly compare complete harnesses, thereby conflating these mechanisms. This study instead holds the ReAct execution loop, safety controls, diagnostics, stuck detection, task environments, and model fixed while varying three harness components independently (2609.20804).

The evaluation covers four models: Nemotron-3 at 30B, 120B, and 550B parameters, plus Mistral-Medium-3.5-128B. The models are evaluated on 500 SWE-Bench Verified tasks and 89 Terminal-Bench 2.1 tasks. The primary metrics are task success rate and model-inference cost. Context management is evaluated across five policies and four nominal context budgets—32k, 64k, 96k, and 128k tokens. Planning and action-space ablations are conducted at the T4/128k configuration. In total, the study reports 176 matched experimental settings.

The harness uses a ReAct loop in which each turn assembles the model input, executes tool calls in an isolated task container, and appends observations to the interaction history. Planning is implemented as a persistent task plan maintained through an update_plan tool. The structured action space exposes file, search, web, and shell tools, whereas the alternative interface provides only bash. Context management combines three mechanisms: elision of stale tool outputs, lossless external storage with recall_event, and LLM-generated summarization.

Figure 1

Figure 1: Modular harness architecture and the staged T4 context-management policy.

The five context-management tiers isolate the contribution of these mechanisms. T0 performs no compaction and terminates when the context window is exceeded. T1 applies irreversible elision, T2 adds recoverable external storage, T3 applies summarization without elision, and T4 stages elision before summarization while retaining recall capability. T4 therefore tests whether cheap, rule-based compression can defer or reduce expensive model-based summarization.

Context management and context-window pressure

The strongest aggregate result concerns the interaction between context management and available context capacity. Context management is most valuable when the nominal context window is small, and its primary benefit is preventing premature termination rather than changing the agent’s underlying workflow.

On SWE-Bench, the mean success-rate advantage of managed tiers over T0 is 35.7 percentage points at 32k tokens, 15.9 points at 64k, 5.5 points at 96k, and 2.7 points at 128k. On Terminal-Bench, the corresponding gains are 9.5, 7.5, 4.8, and 2.8 points. These differences track the frequency of context overflow in T0: the model-averaged overflow rate decreases from 78.7% to 8.7% on SWE-Bench and from 61.0% to 12.1% on Terminal-Bench as the budget expands from 32k to 128k. Every managed tier records zero overflow failures at every tested budget.

Figure 2

Figure 2: Managed context policies eliminate window-overflow failures and yield their largest success-rate gains at smaller context budgets.

This result supports a specific causal interpretation. Context management primarily increases the probability that a trajectory survives long enough to reach code modification and verification. It does not necessarily make the model’s local decisions more accurate. At 32k, unmanaged trajectories commonly terminate during localization, whereas managed trajectories preserve the phase ordering of the workflow and continue into fixing and verification. At 128k, the trajectory profiles and phase distributions of the tiers become substantially more similar. Thus, the principal function of context management in this setting is trajectory preservation under a binding context constraint.

The study also identifies T4 as the most favorable efficiency configuration. Its success rate is broadly comparable to T1–T3, but it has the lowest mean cost in seven of the eight model–benchmark combinations and the lowest average cost at every context budget. T4 also maintains the lowest average peak-context ratio across all budgets. The staged policy explains this result: early elision removes bulky stale observations before the harness invokes an additional LLM call for summarization.

Figure 3

Figure 3: Success-rate ranges, means, and costs across context-management tiers and context budgets.

Figure 4

Figure 4: T4 achieves lower peak-context usage and lower cost by reducing the frequency of summarization calls.

The comparison between T1 and T2 produces a particularly negative result for lossless recall. T2 outperforms T1 in 15 of 32 matched comparisons, underperforms in 14, and ties in three; its equal-weight mean difference is only -0.36 percentage points overall. Recall usage is extremely sparse: across 64 T2 and T4 settings, 56.3% of configurations never invoke recall_event, the median invocation rate is zero, and the mean rate declines from 0.540 calls per task at 32k to 0.007 at 128k. The strongest models almost never use recall, and even the heaviest-use configuration performs 3.37 percentage points worse than the corresponding elision-only condition. The implication is that recoverable storage adds implementation complexity without providing a measurable accuracy benefit in this harness. Models generally adapt to the compressed representation by rereading or rerunning operations rather than retrieving archived observations.

Planning as a capability-dependent intervention

Planning does not have a uniform effect across model capability. Its value shifts from improving trajectory survival for the weakest model to reducing redundant computation for stronger models.

For Nemotron-3 30B, enabling planning raises SWE-Bench success by 11.6 percentage points and Terminal-Bench success by 4.5 points, but increases cost on both benchmarks. The trajectory analysis shows why: without planning, the median SWE-Bench trajectory collapses from 40 turns to 5, while the fraction of runs terminating without an edit rises from 27.8% to 68.6%. The proportion stalled in localization rises from 10.4% to 58.4%. Planning therefore acts as an execution scaffold that sustains weak-model trajectories until they attempt an edit.

For Nemotron-3 550B and Mistral-Medium-3.5-128B, planning instead reduces cost while causing only small changes in accuracy. On SWE-Bench, the cost reductions are approximately 30% and 32%, respectively, accompanied by success-rate changes of -2.0 and -0.4 percentage points. Planning reduces median SWE-Bench trajectory lengths from 108 to 74 turns for Nemotron-3 550B and from 68 to 53 turns for Mistral. The removed actions are primarily post-edit verification rather than localization or repair. Planning consequently functions as a stopping-control mechanism for stronger models that otherwise continue verifying after producing an adequate patch.

Figure 5

Figure 5: Planning improves weak-model accuracy but primarily reduces strong-model execution cost.

The intermediate Nemotron-3 120B model exhibits no consistent planning effect. Planning increases cost on SWE-Bench but reduces it on Terminal-Bench, with little stable success-rate change. This dependence on benchmark type indicates that planning effectiveness is not a monotonic function of parameter count. It depends on the model’s failure mode and on the trajectory-length distribution induced by the task family. On Terminal-Bench, planning can simultaneously preserve trajectories that would terminate early and truncate excessively long trajectories; the net cost effect depends on which population dominates.

The paper’s interpretation is therefore narrower than a general claim that explicit planning is beneficial. The tested planning scaffold is useful when a model prematurely abandons a task and useful for strong models that over-verify, but the same mechanism can increase cost without improving accuracy when the model already maintains an adequate trajectory.

Action-space effects and the capability crossover

The action-space ablation compares a structured interface containing read_file, write_file, edit_file, search tools, bash, and auxiliary tools against a bash-only interface. This is not an isolated tool-count comparison. The intervention also changes interface instructions, file-state tracking, read-before-write enforcement, and automatic post-edit diagnostics. The results must therefore be interpreted as effects of complete action-interface designs.

Structured tools strongly benefit the weakest model. For Nemotron-3 30B, the full interface improves success by 15.0 percentage points on SWE-Bench and 10.1 points on Terminal-Bench relative to bash-only. Under bash-only, 66% of Terminal-Bench trajectories terminate after emitting calls incompatible with the available interface, reducing the average trajectory from 71 to 15 turns. The structured tools provide a model-compatible action vocabulary that the 30B model fails to reproduce reliably through shell commands.

The effect is much smaller for Nemotron-3 120B. The structured interface improves success by 1.6 points on SWE-Bench and 4.5 points on Terminal-Bench, while reducing average trajectory length and avoiding the large cost increase that would otherwise accompany longer execution. At 550B, the direction reverses: bash-only improves success by 3.6 points on SWE-Bench and 5.6 points on Terminal-Bench while reducing cost by 53% and 30%, respectively. The model issues 32% fewer calls on SWE-Bench and 24% fewer on Terminal-Bench under bash-only.

Figure 6

Figure 6: Structured tools help bash-weak models, whereas bash-only lowers cost and can improve accuracy for bash-capable models.

Trajectory-level statistics show that bash-only changes action granularity. For Nemotron-3 550B on Terminal-Bench, the median trajectory falls from 47 to 31 actions while the share of Write Code actions rises from 16% to 27%. The median largest edit on SWE-Bench increases from 18 to 54 lines, and repeated patching declines from 4.6 to 1.5 re-patches per task. On Terminal-Bench, the share of create-or-replace file-writing actions increases from 51% to 76%. Bash allows capable models to compose multiple low-level operations into fewer shell calls, reducing interaction overhead.

Mistral-Medium-3.5-128B demonstrates that the crossover also depends on task type. The structured interface improves SWE-Bench success by 23.2 points, while bash-only improves Terminal-Bench success by 6.7 points. Mistral routes 71.9% of Terminal-Bench workspace actions through bash under the full interface, compared with 40.4% on SWE-Bench, indicating that Terminal-Bench is more shell-centric. Conversely, on SWE-Bench, removing structured tools causes 32.8% of bash-only runs to terminate without editing any file, compared with 1.2% under the full interface. The preferred action space is therefore jointly determined by model-specific shell proficiency and the operational structure of the benchmark.

Trajectory-level synthesis

The trajectory analysis unifies the aggregate results by associating each harness component with a distinct failure mode.

Figure 7

Figure 7: SWE-Bench trajectories show context management preserving execution, planning changing termination behavior, and bash-only altering repair granularity.

Context management primarily increases trajectory survival. At tight context budgets, it preserves more active runs at later turns without substantially changing the proportions of localization, reproduction, fixing, and verification. At 128k, context-management tiers have nearly identical median trajectory lengths and similar re-patch counts, confirming that their principal effect is to prevent context overflow rather than to induce a different repair policy.

Planning changes the location at which trajectories stop. For weak models, it prevents premature termination before editing. For stronger models, it suppresses redundant post-edit verification and reduces the long tail of exploratory or repetitive execution.

Figure 8

Figure 8: Terminal-Bench trajectories show how planning reshapes trajectory length and bash-only concentrates actions into code-writing operations.

The action space changes the granularity of work. Structured tools decompose exploration and editing into typed, low-level operations, which benefits models that cannot reliably express those operations through shell syntax. Bash-only interfaces permit capable models to combine inspection, transformation, and execution into composite commands, reducing the number of interaction steps but increasing the risk of interface misuse for weaker models.

These mechanisms also explain the changing failure-stage distribution. For Nemotron-3 30B, more than half of unresolved SWE-Bench runs fail at file localization, and disabling planning or structured tools raises the localization-failure share to 73.8% and 76.6%, respectively. For Nemotron-3 550B and Mistral, most unresolved runs reach the correct file and lines but fail during patch implementation. The bottleneck therefore moves with capability: weaker models primarily fail to sustain or direct the trajectory, whereas stronger models more often produce an inadequate repair after successful localization.

Limitations and open questions

The results estimate the effects of particular implementations, not universal properties of planning, tools, or memory. Planning is instantiated through one prompt protocol and one persistent plan representation. Context management uses fixed thresholds and a single summarization prompt. The action-space comparison bundles tool availability with interface instructions, state tracking, and post-edit diagnostics, so it cannot isolate tool granularity from these supporting mechanisms.

The factorial design is also incomplete. Planning and action-space ablations are evaluated only under T4 with a 128k budget, leaving their interactions with smaller windows and alternative context tiers unresolved. Each task is run once per setting, and Terminal-Bench contains only 89 tasks; consequently, many Terminal-Bench contrasts do not reach significance under the paired McNemar analysis. The trajectory annotations are produced by LLM judges, although the reported validation is strong: aggregate judge–human agreement is approximately 94.2%, with a weighted mean Cohen’s κ\kappa of 0.929.

External validity is bounded by four models and two benchmarks, with SWE-Bench Verified restricted to Python repositories. Model size is an imperfect capability proxy because training data, tool-interface exposure, and native shell proficiency may contribute to the observed effects. The paper consequently does not establish universal crossover points at which structured tools should be replaced by bash, nor does it determine whether the same context-management conclusions hold for other harnesses, models, programming languages, or task distributions.

Conclusion

The paper demonstrates that coding-harness components have conditional, model-dependent effects rather than uniformly positive contributions. Context management is most valuable when context capacity is scarce, primarily because it prevents overflow-induced trajectory termination. A staged policy that performs rule-based elision before selective summarization achieves the strongest cost profile, while recoverable recall is rarely used and provides no accuracy improvement. Planning improves weak-model success by sustaining execution but mainly reduces strong-model cost by limiting redundant verification. Structured tools scaffold models with weak shell control, whereas bash-only interfaces can improve both efficiency and accuracy for models capable of composing dense shell actions, especially on command-line-centric tasks.

The resulting design principle is empirical rather than architectural: harness components should be selected according to model capability, task structure, and context budget. The main unresolved question is whether these conditional effects persist under a full factorial evaluation in which planning, action space, and context management are jointly varied across models and context capacities.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

Explain it Like I'm 14

1. What is this paper about?

This paper studies how to build better coding agents. A coding agent is an AI system that can read code, change files, run tests, and try to solve programming tasks by itself.

The researchers focus on the software layer around the AI model, called a coding harness. The harness gives the AI tools and rules for working on a task. For example, it may help the AI:

  • make a plan,
  • read and edit files,
  • use the command line,
  • remember important information when the conversation becomes too long.

The main idea is that the same AI model can perform very differently depending on how this harness is designed.

2. What questions did the researchers ask?

The researchers wanted to understand which parts of a coding harness are useful and when they are useful. In particular, they studied three parts:

  1. Planning: Does asking the AI to create and update a task plan help it solve problems?
  2. Action space: Is it better to give the AI many special tools, such as read_file and edit_file, or only one general command-line tool called bash?
  3. Context management: What should the harness do when the AI’s conversation becomes too long for its memory limit?

They also asked whether the best design depends on:

  • how powerful the AI model is,
  • how much memory it has,
  • what kind of programming task it is solving.

3. How was the research carried out?

The coding harness

The researchers built a small, modular harness. “Modular” means that each part could be switched on or off separately, like testing different parts of a bicycle one at a time.

The AI worked in a repeating loop:

  1. Think about what to do.
  2. Use a tool or run a command.
  3. Observe the result.
  4. Decide what to do next.

This is similar to a student solving a difficult homework problem by trying something, checking the result, and then choosing the next step.

The three parts they changed

Planning

When planning was enabled, the AI kept a written list of steps, such as:

  1. Find the relevant file.
  2. Understand the bug.
  3. Change the code.
  4. Run tests.
  5. Fix any remaining problems.

The researchers compared this with a version where the AI had no special planning system.

Action space

The researchers compared two ways for the AI to work:

  • Predefined tools: The AI could use special tools for reading, writing, editing, searching, and running commands.
  • Bash-only: The AI could use only the command line, much like typing commands into a computer terminal.

The predefined tools are like giving someone separate buttons for “open file,” “search text,” and “save file.” Bash-only is like giving them one powerful but more complicated command box.

Context management

An AI can only remember a limited amount of text at once. This limit is called the context window. If the conversation becomes too long, the AI may forget earlier information or stop working.

The researchers tested five strategies:

  • No management: The AI stopped when the conversation became too long.
  • Elision: Old, bulky results were replaced with short notes.
  • Recall: Removed information was saved elsewhere so the AI could retrieve it later.
  • Summarization: Older parts of the conversation were shortened into a summary.
  • Combined strategy: The system first removed bulky information and then summarized older information if needed.

This is similar to cleaning up a messy notebook: keeping recent pages, replacing long printouts with labels, and writing summaries of older notes.

Models and tasks

The researchers tested four AI models:

  • Three versions of Nemotron-3: 30B, 120B, and 550B
  • One Mistral model

The numbers roughly indicate model size. Larger models generally have more ability, although size alone does not guarantee better results.

They used two programming benchmarks:

  • SWE-Bench Verified: 500 real programming problems from GitHub projects.
  • Terminal-Bench 2.1: 89 tasks requiring the AI to complete activities through a command line.

They tested 176 different experimental settings, changing the planning system, tools, context limits, and context-management methods. They measured:

  • Success rate: How often the AI completed the task.
  • Cost: How many paid AI tokens were used.
  • Trajectory: The sequence of actions the AI took from beginning to end.

4. What did the researchers discover?

Context management is most useful when memory is limited

Context management helped the most when the AI had a small context window.

With no context management, many tasks ended simply because the conversation became too long. At the smallest tested memory size, 32,000 tokens, this happened in about:

  • 79% of SWE-Bench runs
  • 61% of Terminal-Bench runs

The managed systems avoided these overflow failures.

As the context window became larger, fewer tasks ran out of space. Because of this, context management provided a smaller improvement.

Why this matters: A smart way of managing memory can allow an AI to keep working instead of stopping halfway through a task.

Combining cheap removal with summarization worked best

The strongest overall strategy was the combined method, called T4 in the paper.

T4 first removed old, bulky tool results and only used AI-generated summaries when necessary. This was usually cheaper than summarizing everything from the beginning.

T4 achieved about the same success rate as the other useful strategies while generally using less money and less context.

Saving removed information for later was not very helpful

The researchers expected that allowing the AI to retrieve removed information might improve performance. However, the AI rarely used this ability.

In many experiments, the AI never asked to recover old information. When it did use the recovery tool, this usually did not improve its success rate.

This suggests that adding a complicated memory-retrieval system may not be worth it unless the AI is trained to use that system effectively.

Planning helped weaker models more than stronger models

Planning had different effects depending on the model’s ability.

For the weaker 30B model:

  • Planning increased the number of successful tasks.
  • It made the AI continue working long enough to edit the correct file.
  • It also increased cost because the AI took more steps.

For the stronger models:

  • Planning usually did not greatly improve accuracy.
  • It often reduced cost.
  • It helped the models avoid unnecessary actions, especially repeated checking after the code had already been fixed.

In simple terms, planning acted like a support structure for weaker models but like an efficiency tool for stronger models.

Special tools helped weaker models

The predefined tools helped the weaker models perform better. These models sometimes struggled to express their intentions correctly using only command-line commands.

For example, they might produce a command that the harness could not understand or execute. The special tools gave them clear, reliable ways to read and edit files.

Stronger models sometimes preferred bash-only

The stronger models could often combine several operations into one complex command. For these models, the predefined tools sometimes created extra steps and extra costs.

On some tasks, especially command-line-focused tasks, bash-only led to:

  • Lower cost
  • Fewer tool calls
  • Equal or better success rates

However, bash-only was not always better. On tasks that required carefully searching and editing large code projects, predefined tools were still useful.

The best setup depends on the task and model

There was no single harness design that was best for every situation.

A useful summary is:

Situation Likely helpful choice
Small context window Use context management
Weak coding model Provide predefined tools and planning
Strong model with good command-line skills Consider bash-only
Command-line-heavy task Bash-only may be efficient
Large software repository Structured reading, searching, and editing tools may help
Expensive summarization Remove old information first, then summarize only if needed

5. Why are these findings important?

The paper shows that improving an AI coding agent is not only about making the LLM larger or smarter. The tools and rules surrounding the model can make a major difference.

The results suggest that developers should design harnesses based on:

  • the model’s abilities,
  • the type of programming task,
  • the available memory,
  • the acceptable cost.

For example, a weaker model may need more guidance, planning, and specialized tools. A stronger model may work faster with a simpler interface. If memory is limited, the harness should carefully remove or summarize old information so the AI does not stop early.

Overall, the paper provides a practical lesson: there is no universal best coding harness. The best design is one that matches the AI model and the task. This could help future coding agents solve real software problems more reliably, use fewer resources, and work for longer periods without losing important information.

Knowledge Gaps

Knowledge gaps, limitations, and open questions

  • Generalization beyond the evaluated models is unresolved. The study uses three sizes from the Nemotron-3 family and one Mistral model, leaving unclear whether the observed capability-dependent effects transfer to other model families, proprietary models, multimodal models, or models with different tool-use training.
  • The capability axis is confounded with model-family and serving differences. Nemotron-3 sizes are compared within one family, while the only cross-family comparison is a single approximately 128B Mistral model; the study cannot cleanly separate parameter scale, training data, instruction tuning, architecture, and native tool-calling ability.
  • The effects of harness components are not evaluated across all component combinations. Planning and action-space ablations are performed only with T4 context management and a 128k window, so interactions among planning, action space, context strategy, and tighter budgets remain unknown.
  • The planning intervention is narrower than general planning. Results measure the effect of a persistent injected plan and an update_plan tool, not alternative planning methods such as hierarchical plans, external planners, replanning triggers, self-reflection, or model-generated implicit plans.
  • The action-space comparison is substantially confounded. The predefined-tool condition changes not only available actions but also argument schemas, read-before-write enforcement, file-state tracking, automatic diagnostics, validation behavior, and tool descriptions; therefore, the study cannot identify which of these factors causes the observed differences relative to bash-only interaction.
  • The study does not isolate action granularity from interface vocabulary. Bash-only tools permit composite commands, whereas predefined tools decompose operations into typed actions. It remains unclear whether performance changes arise from compositionality, tool-call count, learned tool names, argument structure, or the cognitive overhead of selecting among tools.
  • The optimal context-management policy is not established across more diverse policies. The five tiers test only one particular elision, retrieval, and summarization implementation. Alternative eviction policies, importance-based retention, selective summarization, hierarchical memory, retrieval ranking, or learned context controllers are not compared.
  • The chosen context thresholds are not independently optimized. T4 uses fixed soft and hard thresholds of 0.6 and 0.85 of the usable window, leaving unresolved whether its advantage depends on these particular thresholds or whether model- and task-specific threshold tuning would produce substantially better accuracy or cost.
  • The quality and faithfulness of summaries are not systematically evaluated. The analysis reports summary frequency and downstream task success but does not measure whether summaries preserve critical code, error messages, test results, or task state, nor which information is most frequently lost.
  • The causes of rare recall use remain unclear. Models seldom invoke recall_event, but the study does not determine whether this reflects low information need, poor discoverability of stored events, inadequate identifiers and descriptions, weak retrieval planning, prompt interference, or the actual irrelevance of elided content.
  • The external recall mechanism is not compared with automatic retrieval. The paper tests model-initiated recall only; it does not evaluate event ranking, semantic retrieval, proactive reinsertion, or hybrid systems that automatically expose likely relevant observations.
  • Context management may alter behavior in ways not captured by the trajectory analysis. The claim that management primarily extends trajectories is based on coarse workflow labels and aggregate behavior; subtle changes in reasoning, localization accuracy, command choice, and error recovery are not directly measured.
  • Trajectory annotation reliability and validity remain insufficiently characterized. Workflow phases are assigned by an LLM judge, with human agreement referenced but not reported in the provided text in detail; possible judge bias, label ambiguity, and errors in inferred termination causes remain open concerns.
  • The reported causal mechanism for context-management gains is not fully verified. Managed tiers eliminate overflow failures, but the experiments do not disentangle the benefit of avoiding overflow from possible benefits or harms caused by elision, summaries, altered prompt length, or changes in model attention.
  • The study does not test context windows beyond 128k or below 32k. It therefore cannot establish whether the reported trends continue for modern very-large-context models, extremely constrained agents, or context budgets where even the initial task and recent-turn reserve are difficult to maintain.
  • The relationship between nominal context budget and effective usable context is underexplored. Fixed prompt overhead, tool-result truncation, tokenizer differences, and reserved recent-window space may cause the same nominal budget to represent different usable capacities across models and configurations.
  • Reproducibility under stochastic sampling is uncertain. All experiments use temperature zero, and the paper does not report repeated runs, confidence intervals, or sensitivity to sampling randomness; the stability of success rates and component effects under nonzero temperature is unknown.
  • Statistical power is limited for some comparisons. Terminal-Bench contains only 89 tasks, and several reported differences are small; the study does not establish whether nonsignificant results reflect genuine equivalence or insufficient power.
  • Task-level heterogeneity is only partially analyzed. The paper distinguishes SWE-Bench from Terminal-Bench and discusses shell-centric tasks, but it does not provide a systematic taxonomy of repository size, programming language, test complexity, required tools, task length, or localization difficulty to identify where each component helps or fails.
  • Benchmark contamination and task familiarity are not fully addressed. Although web search is excluded, models may still have memorized public repositories, issues, solutions, or benchmark-specific conventions; the extent to which this affects comparisons among harnesses is not measured.
  • Binary success rate does not capture solution quality. The evaluation does not examine patch maintainability, correctness beyond benchmark tests, regression risk, security, unnecessary modifications, code style, or whether solutions satisfy unstated engineering requirements.
  • Cost comparisons may not generalize across deployment settings. Costs are based on specified OpenRouter prices and token counts, but they omit infrastructure utilization, latency, parallel execution overhead, tool-execution time, summarization latency, and the operational cost of maintaining external storage.
  • The impact of latency and wall-clock efficiency is unresolved. A policy can reduce token cost while increasing elapsed time through extra summarization calls, serial tool calls, or verification steps; no end-to-end latency analysis is reported.
  • The fixed safety, diagnostic, and stuck-detection components may interact with the ablated components. Because these mechanisms remain unchanged and are not independently ablated, some observed effects—especially those attributed to planning or action space—may depend on their specific thresholds and feedback behavior.
  • The robustness of the conclusions to tool-result truncation is unknown. Tool outputs are capped at 24k characters, but the study does not vary this limit or determine whether apparent context-management effects arise partly from truncation before the formal context policies operate.
  • The 300-step limit may influence component comparisons. Planning, context management, and bash compositionality can change the number and granularity of steps, but the study does not test whether conclusions persist under different step budgets or under cost- and time-based termination criteria.
  • Failure recovery is not analyzed in sufficient detail. The paper identifies premature termination and localization failures, but does not systematically measure recovery from incorrect edits, failed tests, malformed tool calls, shell errors, summary errors, or repeated action failures across configurations.
  • The transferability of the findings to interactive human–agent workflows is unknown. All experiments use autonomous agents; it remains unclear whether the same planning, context, and action-space trade-offs apply when humans can provide clarification, approve actions, or intervene after failures.
  • The paper does not establish whether harness components should be selected dynamically. The results suggest that optimal design depends on model capability, context budget, and task type, but no online classifier, routing policy, or adaptive mechanism is proposed or evaluated for choosing planning, tools, or compression strategies per task.

Practical Applications

Immediate Applications

  • Deploy adaptive context management in coding-agent products (software engineering, developer tools) Implement a staged policy like the paper’s T4 configuration: first elide bulky, stale tool outputs, then summarize older history only when necessary. This can be integrated into autonomous issue-resolution systems, IDE copilots, CI repair bots, and terminal agents today. Expected benefit: fewer context-overflow failures, longer execution trajectories, and lower inference cost without requiring a larger model or context window. Dependencies: reliable token accounting, preservation of the system prompt and recent turns, safe handling of summaries, and validation that important information is not removed.
  • Use context management as a cost-control layer for small-context or lower-cost models (cloud AI, edge AI, enterprise automation) Organizations using models with 32k–64k context windows can prioritize elision and staged compression because the largest gains occurred under tight budgets. This may allow less expensive models to handle repository-scale tasks that would otherwise terminate prematurely. Assumption: the workload contains repetitive or bulky observations—such as test logs, file listings, and command outputs—that can be safely compressed.
  • Adopt model-specific planning policies (software engineering platforms, agent orchestration) Planning should not be enabled uniformly. For weaker models, persistent plans can improve the probability of reaching an edit and verification stage. For stronger models, planning may primarily reduce redundant post-edit actions and lower cost. A production harness can therefore select planning dynamically using model identity, benchmark history, task complexity, or early trajectory behavior. Potential workflow: begin with planning enabled; disable or simplify it for models that demonstrate reliable task decomposition, or use a lightweight plan only for multi-file and multi-stage tasks. Dependencies: calibrated model-capability estimates and monitoring of success, cost, and premature termination.
  • Select the action interface according to model capability and task type (developer tools, robotics, infrastructure automation)
    • Structured tools for repository issue fixing, where localization, precise edits, and read-before-write behavior are important.
    • Bash-centric interfaces for DevOps scripts, terminal administration, build pipelines, and command-line tasks.
    • Dependencies: model-specific testing, accurate tool schemas, command sandboxing, and protection against malformed or unsupported tool calls.
  • Build modular harness evaluation into enterprise agent procurement (industry, academia, public-sector technology) Instead of comparing complete agents as opaque systems, organizations can evaluate planning, action space, and context management independently under matched models and tasks. A procurement or internal benchmarking workflow could report success rate, cost per task, context-overflow rate, trajectory length, and termination stage. Benefit: identifies whether a vendor’s improvement comes from the model itself or from scaffolding that may not transfer to another model or workload. Dependencies: representative private tasks, reproducible containers, task-paired statistical tests, and consistent safety controls.
  • Add trajectory-aware monitoring to coding-agent operations (software reliability and engineering management) Production systems can monitor whether an agent has localized the relevant file, produced an edit, run verification, or entered a repetitive failure loop. The paper’s phase-based trajectory analysis and stuck detection suggest practical dashboards and runtime alerts. Potential tools: agent observability platforms showing context utilization, repeated calls, edit latency, verification coverage, and reasons for termination. Dependencies: reliable event logging, phase classifiers, and safeguards against terminating legitimate long-running operations.
  • Use safety and diagnostic components as standard coding-agent infrastructure (software supply chain, cybersecurity) The paper’s fixed substrate can be deployed independently of its experimental findings: project-root and symlink guards, read-before-write checks, permission layers, post-edit linting, syntax checks, and repeated-call termination. Practical outcome: safer automated pull requests, reduced accidental workspace damage, and earlier detection of syntax or undefined-name errors. Dependencies: language-specific diagnostics, secure container isolation, human review for high-impact changes, and correct handling of generated or dynamically modified files.
  • Optimize inference budgets using accuracy–cost profiles rather than success rate alone (finance, cloud operations, AI platform management) Agent managers can route tasks among model and harness configurations based on expected return. For example, a cheaper bash-only configuration may be appropriate for shell-heavy tasks, while a structured-tool configuration may be justified for repository debugging. Potential product: a task router that predicts task type and selects model size, planning mode, context policy, and tool interface. Dependencies: reliable cost accounting, task classification, and tolerance for small changes in success rate.
  • Teach agent engineering through controlled harness ablations (academia and education) The modular harness provides a practical experimental framework for courses and research laboratories studying tool use, planning, memory, and long-horizon interaction. Students can reproduce comparisons between structured tools and bash, or between elision and summarization, using containerized coding tasks. Dependencies: access to compatible models, benchmark licenses or local tasks, annotation resources, and controls for contamination or data leakage.

Long-Term Applications

  • Develop capability-aware, self-adapting coding harnesses (autonomous software engineering)
    • structured tools versus bash-only interaction;
    • explicit planning versus lightweight planning;
    • elision thresholds and summarization frequency;
    • larger or smaller inference budgets.
    • Required development: online policy learning, robust capability estimation, and safeguards against adapting based on noisy early behavior.
  • Create learned context-management policies (AI systems, memory and retrieval) The paper shows that simple staged elision is highly competitive and that models rarely use explicit recall. A longer-term system could learn which observations are worth retaining, summarizing, or discarding based on their predicted future utility rather than relying only on age, size, or tool type. Potential products: salience-aware agent memory, dependency-linked summaries, and retrieval systems that automatically surface the exact test failure, code location, or command output needed for a later decision. Dependencies: high-quality relevance labels, robust retrieval evaluation, protection against summary-induced errors, and additional latency constraints.
  • Generalize harness design principles beyond coding (robotics, scientific automation, business-process agents)
    • Robotics: structured manipulation primitives versus general-purpose scripting; compressed sensor histories; adaptive task plans.
    • Scientific workflows: context compression for experiment logs and adaptive planning of laboratory procedures.
    • Finance and operations: tool schemas for querying data, executing controlled actions, and maintaining long-running case histories.
    • Dependencies: domain-specific safety requirements, reliable state representations, and evaluation tasks that capture long-horizon consequences.
  • Build risk-sensitive action spaces for regulated domains (healthcare, finance, public policy) The structured-tool findings could motivate interfaces in which high-impact actions are exposed through typed, permissioned operations rather than unrestricted shell access. A healthcare agent, for example, might use explicit tools for retrieving records, drafting notes, and requesting approval, while prohibiting direct writes to clinical systems. Required development: authorization models, audit logs, human approval gates, privacy controls, and formal verification of tool side effects. The paper’s results alone do not establish safety in these domains.
  • Develop benchmark suites that evaluate harness transfer and interaction effects (academic research and policy evaluation) Future benchmarks should vary model capability, context budget, task type, action interface, and planning requirements independently. They should also measure overflow failures, unsupported tool calls, unnecessary verification, and failure stage—not only final success. Benefit: more reliable evidence for comparing agent architectures and less risk of overgeneralizing from one model family or benchmark. Dependencies: diverse tasks, human-validated trajectory labels, independent test sets, and statistical methods for paired outcomes.
  • Use dynamic planning and verification budgets in autonomous code maintenance (large-scale software repositories) Long-term systems could allocate planning and verification effort based on predicted risk. A simple one-file change might use minimal planning, while a cross-service API change could require explicit plans, dependency checks, tests, and human approval. Potential workflow: classify change risk → choose planning depth → execute with adaptive context compression → run diagnostics and tests → escalate uncertain patches. Dependencies: accurate change-impact analysis, repository-specific testing, and robust estimates of when planning reduces rather than increases cost.
  • Enable smaller models to perform reliable long-horizon automation (edge computing, education, small businesses) Because context management and structured tools substantially scaffold weaker models, future systems may combine inexpensive models with carefully engineered harnesses instead of relying exclusively on very large models. This could lower deployment costs and enable on-premises or resource-constrained automation. Dependencies: sufficient baseline reasoning ability, domain-specific fine-tuning, secure local execution, and evidence that benchmark gains transfer to real workloads.
  • Establish policy and governance standards for autonomous coding agents (software governance and public policy) The paper supports measurable operational requirements for deployed agents: bounded context use, action authorization, workspace isolation, diagnostic checks, stuck detection, cost limits, and auditable trajectories. These could become part of organizational AI governance or procurement standards. Caveat: the study evaluates benchmark coding tasks and does not demonstrate compliance, security, or reliability in production. Standards would require additional adversarial, privacy, and real-world impact assessments.

Glossary

  • Ablation: An experiment in which a component is removed or altered to measure its effect. “We separately ablate planning and the action space at a 128k context-window budget with T4 context management strategy”
  • Action space: The set of operations an agent can select to interact with its environment. “The action space defines how the agents interact with the environment.”
  • Benjamini–Hochberg procedure: A multiple-comparison correction method that controls the expected false-discovery rate. “apply the Benjamini--Hochberg procedure to control the false discovery rate at 0.05.”
  • Bash-only interface: An action interface in which the agent interacts with the environment exclusively through the Bash shell. “The bash-only setting removes predefined file, search, and web tools, leaving bash for general environment interaction”
  • Context overflow: A failure that occurs when an interaction history exceeds the model’s available context window. “with most of its benefit coming from preventing context-overflow failures.”
  • Context window: The bounded amount of input and output information a LLM can process in one invocation. “We compare five strategies under four context-window budgets of 32k, 64k, 96k, and 128k tokens.”
  • Context management: Techniques for retaining, compressing, or discarding interaction history within a bounded context window. “Context management determines how the growing interaction history is represented within a bounded context window.”
  • Context compression: The reduction of the size of an interaction history while attempting to preserve useful information. “Context compression, mechanism use, and cost across context-window budgets.”
  • Content hash: A hash value computed from file contents to detect whether the contents have changed. “and detects external modification through a content hash.”
  • Cross-family comparison: An evaluation that compares models or systems from different model families. “with Mistral-Medium-3.5-128B as a cross-family comparison.”
  • Elision: The replacement or removal of older content from an interaction history, usually to save context space. “Elision (M1) replaces the body of a stale tool observation with a short stub.”
  • Exact McNemar test: A statistical test for comparing paired binary outcomes, especially when sample sizes are small. “compare success rates using two-sided exact McNemar tests on task-paired outcomes”
  • False discovery rate: The expected proportion of false positive findings among all findings declared statistically significant. “to control the false discovery rate at 0.05.”
  • Finite context window: A limited-capacity model input history that cannot contain unlimited prior interaction data. “a context-management policy decides what interaction history remains available under a finite window”
  • Harness: A software layer that controls an agent’s interaction loop, tools, context, and environment. “We build a coding harness whose surrounding execution loop remains fixed while varying three central components”
  • Lossless method: A context-management method that preserves the ability to recover the original information. “Existing methods are lossy or lossless.”
  • Lossy method: A context-management method that reduces context by discarding or altering information that may not be recoverable. “Lossy methods such as elision and summarization reduce context but may remove information that becomes useful later”
  • Long-horizon task: A task requiring an agent to perform many dependent actions over an extended execution trajectory. “We evaluate every model on two complementary long-horizon coding benchmarks”
  • Model capability axis: An experimental dimension that represents differences in model ability, often using models of different sizes. “as a within-family capability axis”
  • Natural-language summary: A textual condensation of previous interaction events expressed in ordinary language. “Summarization (M3) folds older messages into a running natural-language summary.”
  • Observation: Information returned by the environment after an agent performs an action. “The harness follows a ReAct loop, with each turn comprising a reasoning step, an action, and an observation”
  • Post-edit diagnostics: Automated checks performed after code is modified to identify errors or other problems. “After the agent edits or writes a Python file, the harness runs a fast, read-only check on it with ruff, pyflakes, or a syntax-only fallback”
  • Predefined tool set: A fixed collection of typed operations exposed to an agent for interacting with files, search, execution, and other services. “The predefined-tool provides read_file, write_file, edit_file, list_files, glob_files, grep_text, web_fetch, and bash”
  • Recall mechanism: A facility that retrieves previously elided information from external storage. “Recall (M2) makes elision reversible by storing elided observations externally and exposing recall_event for on-demand retrieval.”
  • ReAct loop: An agent interaction pattern that alternates reasoning, action, and observation. “The harness follows a ReAct loop”
  • Read-before-write check: A safety constraint requiring a file to be read before it can be edited or overwritten. “A read-before-write check refuses to edit or overwrite a file that has not been read in the current session”
  • Repository-level issue resolution: The process of diagnosing and modifying a software repository to address an issue. “SWE-Bench Verified, which tests repository-level issue resolution”
  • Scaffold: A supporting structure that guides an agent’s behavior or task progression. “planning shifts from an accuracy scaffold for weaker models to a cost saver for stronger models”
  • Shell command: An instruction executed by a command-line shell to perform an operation in the environment. “This is consistent with the model using denser, more composite shell commands”
  • Staged policy: A policy that applies multiple processing mechanisms sequentially according to specified conditions. “T4 combines elision, recoverable external storage, and summarization in a staged policy that applies elision before invoking summarization.”
  • Stuck detection: A mechanism that identifies repeated ineffective actions and interrupts or redirects the agent. “The harness monitors the tool log for streaks of identical calls”
  • Summarization: The process of condensing multiple interaction events into a shorter textual representation. “Summarization (M3) folds older messages into a running natural-language summary.”
  • Task-paired outcome: An outcome measured for the same task under two directly comparable experimental conditions. “compare success rates using two-sided exact McNemar tests on task-paired outcomes”
  • Tool invocation: A single instance of an agent requesting or executing a tool operation. “the proportion of tool calls issued through bash”
  • Trajectory: The ordered sequence of states, actions, and observations produced during an agent’s execution of a task. “Trajectory-level analysis explains these effects”
  • Trajectory-level analysis: Analysis of agent behavior across complete execution sequences rather than only final task outcomes. “Beyond success rate and cost, we conduct trajectory-level analysis to characterize how each intervention changes task progression”
  • Typed argument schema: A formal specification of the names and types of arguments accepted by a tool. “Each tool has a typed argument schema and a description specifying its protocol, errors, and side effects”
  • Window-overflow failure: A task failure caused by the interaction history exceeding the permitted context-window capacity. “the fraction of tasks T0 loses to window overflow.”

Open Problems

We found no open problems mentioned in this paper.

Tweets

Sign up for free to view the 16 tweets with 49 likes about this paper.

HackerNews