Structuring Agent Harnesses for Better Edits
Listen to the summary
Uses a voice available on your device
Audio options
On this page 4 sections
Related concepts 2 concepts
Key Takeaways
- The Harness Handbook organizes code into a hierarchical tree and cross-stage state registers to solve the difficulty of behavior localization in large systems.
- The system uses Behavior-Guided Progressive Disclosure to connect high-level requirements to specific code implementations.
- Handbook-assisted planning improved win rates on Codex to 38.3 percent and Terminus-2 to 45.6 percent.
- Planner token usage per request dropped by 12.7 percent on Codex and 8.6 percent on Terminus-2.
- F1 localization scores improved by between 5.0 and 18.8 points compared to Opus 4.8 and GPT-5.5 reference plans.
Summary & Methodology Analysis
The Harness Handbook addresses the behavior localization bottleneck in agent systems by utilizing static program analysis and LLM-assisted behavioral structuring. This approach constructs a behavior-centric representation of the codebase, organized into a hierarchical L1 to L3 document tree that maps the System, Component, and Unit levels. By integrating a cross-stage state-register view, the system enables Behavior-Guided Progressive Disclosure, allowing agents to navigate from abstract behavioral goals to concrete code segments. Before committing any edits, the system verifies candidate locations against the current repository state to ensure accuracy, and it maintains synchronization by automatically updating only the affected sections of the handbook when repository diffs occur. The architecture relies on rigorous validation cycles to maintain the mapping between behavioral descriptions and code implementation. Performance evaluations demonstrate significant efficiency gains, with Codex win rates rising from 28.3 percent to 38.3 percent, and Terminus-2 win rates increasing from 26.7 percent to 45.6 percent. Token efficiency also improved, with a 12.7 percent decrease in token usage for Codex and an 8.6 percent decrease for Terminus-2. Despite these gains, the system operates under conservative constraints: any code that cannot be parsed or revalidated is excluded from the handbook until it can be refreshed. This approach prioritizes stability over aggressive guessing, ensuring the handbook remains a reliable source of truth during the development lifecycle.
Interactive System Flowchart
Cross-Examination & FAQs
A deeper dive clarifying mechanics, constraints, and baseline evaluations.
Q1. What is the main problem this paper addresses?
It addresses the difficulty of modifying large, tightly coupled agent harnesses where it is hard to find the exact code locations that implement specific behaviors.
Q2. What is the Harness Handbook?
It is a behavior-centric representation of a codebase that uses hierarchical structuring to help developers and agents navigate and edit code.
Q3. Does this tool help automate code changes?
Yes, it assists in the planning phase of edits by identifying candidate code locations and verifying them against the current state of the repository.
Q4. How is the codebase structured in the handbook?
It is organized into a hierarchical L1 to L3 document tree covering system, component, and unit levels, alongside a cross-stage state-register view.
Q5. How does the system handle changes to the codebase?
It automatically resynchronizes by processing repository diffs and updating only the parts of the handbook structure that are affected.
Q6. What happens if a part of the code cannot be parsed?
The system handles it conservatively by freezing or excluding that content rather than making guesses.
Q7. What is the impact on token consumption?
Planner token use per request decreased by 12.7 percent on Codex and 8.6 percent on Terminus-2.
Q8. Which models and benchmarks were used in the evaluation?
The study utilized Terminus-2, Codex, GPT-5.5, Opus 4.8, DeepSeek-V4-Pro, AutoGen, OpenHands, Claude Code, and NexAU.
Q9. What is the limitation regarding repository revalidation?
If a locator cannot be revalidated against the current repository during a task, it is excluded from the localization process until it is refreshed.