Harness^2: Recursive Agent Harnessing for an Open World
Organizations: Northwestern University · Google Cloud AI Research
Abstract
LLM agents' capabilities depend not only on their underlying models but also on their execution harnesses. Recursive self-improvement (RSI) offers a promising approach to automatically evolve these harnesses. However, deploying RSI in open-world settings still faces two critical challenges. First, open-world tasks are typically unseen during the harness design phase and novel at test time, leaving no ground-truth verifiers to reliably guide online harness edits. Second, the RSI process remains highly task-specific and fails to generalize to novel scenarios. We introduce Harness^2, a plug-and-play, recursive agent harnessing framework that addresses these challenges through two connected levels of recursion. Task-level recursion refines the current task's harness using a contrastive Propose-Probe-Compose step that reliably guides edits without ground-truth verifiers, and can be scaled further via parallel or sequential recursion. Harnessing-level recursion then extracts experience from these edits to update a continual improvement harness, enabling the agent to better adapt to future tasks. Across three professional benchmarks and four model-harness configurations, a single step consistently improves GLM-5 and Gemini 3.5 Flash over their base harnesses, yielding gains of up to 11.5 points on WorkBuddy-Bench, 4.5 points on JobBench, and 11.8 percentage points on LAB, with further gains as the task-level recursion budget increases.
Figures & tables
| Models | Method | Code | Web | Office | Avg. | ||||
| Score | #Steps | Score | #Steps | Score | #Steps | Score | #Steps | ||
| Gemini 3.5 Flash | OpenCode | 73.4 (3.6) | 29.6 (1.0) | 69.9 (4.2) | 19.2 (0.8) | 74.0 (2.2) | 27.3 (3.3) | 72.4 (0.9) | 25.4 (0.4) |
| ReasoningBank | 72.6 (3.1) | 28.7 (2.6) | 70.7 (6.9) | 18.8 (0.7) | 76.8 (2.1) | 27.1 (1.2) | 73.4 (2.5) | 24.9 (1.0) | |
| Meta-Harness † | 75.5 (1.7) | 31.5 (0.8) | 75.1 (0.6) | 26.4 (1.1) | 78.6 (1.4) | 28.6 (2.4) | 76.4 (0.7) | 28.8 (0.8) | |
| Harness Scaling | 74.0 (1.1) | 26.1 (0.9) | 74.0 (1.9) | 16.6 (1.5) | 77.9 (1.3) | 24.3 (1.4) | 75.3 (0.7) | 22.3 (0.4) | |
| Harness 2 | 76.5 (1.3) | 22.8 (1.3) | 76.4 (4.5) | 17.7 (0.7) | 79.5 (3.1) | 25.1 (1.7) | 77.5 (2.5) | 21.9 (0.4) | |
| OpenCode | Codex | ||||||||
| Models | Method | JobBench | LAB | JobBench | LAB | ||||
| Score | #Steps | Partial | #Steps | Score | #Steps | Partial | #Steps | ||
| Gemini 3.5 Flash | Base harness | 31.5 (1.1) | 63.6 (4.3) | 79.9 (0.6) | 29.0 (0.8) | 33.9 (2.6) | 53.6 (3.3) | 71.6 (1.3) | 49.8 (0.9) |
| ReasoningBank | 30.8 (2.3) | 65.7 (2.5) | 77.3 (3.1) | 31.3 (1.1) | 30.2 (2.7) | 54.1 (4.0) | 74.8 (0.9) | 52.7 (2.8) | |
| Meta-Harness † | 35.8 (1.0) | 71.8 (3.7) | 81.6 (3.9) | 31.1 (2.0) | 34.8 (1.6) | 57.4 (2.1) | 76.5 (2.1) | 56.7 (2.6) | |
| Harness Scaling | 32.9 (3.1) | 64.5 (1.2) | 78.9 (4.3) | 31.4 (1.1) | 33.6 (0.6) | 50.8 (2.1) | 67.9 (2.4) | 53.1 (2.0) | |
| Methods | WorkBuddy | JobBench |
| Harness 2 | 77.5 | 36.0 |
| w/o library | 74.4 | 34.2 |
| w/o scoping | 74.6 | 32.3 |
| w/o composition | 75.9 | 34.1 |
Appendix figures & tables14 assets
Supplementary material from the paper’s appendix.
Appendix
| Method | Object | Stage | Label | Streaming | Scaling | Improver Update |
| DSPy ( Khattab et al., 2024 ) | Prompts | Offline | ✓ | ✗ | ✗ | ✗ |
| GEPA ( Agrawal et al., 2026 ) | Prompts | Offline | ✓ | ✗ | ✗ | ✗ |
| ADAS ( Hu et al., 2025 ) | Agent Design | Offline | ✓ | ✗ | ✗ | ✓ |
| AFlow ( Zhang et al., 2025 ) | Agent Workflow | Offline | ✓ | ✗ | ✗ | ✓ |
| Meta-Harness ( Lee et al., 2026b ) | Harness | Offline | ✓ | ✗ | ✗ | ✓ |
| AI4AI ( Qian et al., 2026 ) | Harness | Offline | ✓ | ✗ | ✗ | ✓ |
| Group | Component | Activation | Definition |
| Context construction What enters the context, and when. | \comptag C1 System prompt systemprompt.md | Every call | Persona and top-level procedure followed on all tasks. |
| \comptag C2 Guardrails guardrails.md | Every call | Hard constraints that hold regardless of task or tool. | |
| \comptag C3 Memory LongTermMEMORY.md | Every call | Durable domain facts persisted across tasks in a domain. | |
| \comptag C6 Skills skills/ n /SKILL.md skills/ n /scripts/* | skill tool | Specialist procedure loaded into context only when invoked, so it costs nothing on tasks that do not need it. | |
| Tool interface Tools and guidance. | \comptag C4 Tool guidance tool_descriptions/ tool_guidance.md | Every call | When and how each existing tool should be used. |
| \comptag C7 Scripts scripts/ name .py | Run via bash | A new deterministic capability, executed instead of being reasoned through token by token. |
| Configuration | Code | Web | Office | Avg. |
| Base harness | 73.4 | 69.9 | 74.0 | 72.4 |
| Harness 2 (full) | 80.8 | 78.3 | 83.4 | 80.8 |
| w/o prompt ∗ | 78.8 | 76.0 | 83.1 | 79.3 |
| w/o skills | 77.2 | 71.4 | 77.9 | 75.5 |
| w/o scripts | 79.3 | 76.0 | 76.0 | 77.1 |
| WorkBuddy-Bench | JobBench | LAB | ||||
| Method | #Tool calls | Error (%) | #Tool calls | Error (%) | #Tool calls | Error (%) |
| Base harness | 20.0 | 0.8 | 27.4 | 14.4 | 20.8 | 2.0 |
| Harness 2 | 17.8 ↓11.0% | 0.5 ↓37.5% | 32.8 ↑19.7% | 9.1 ↓36.8% | 25.2 ↑21.2% | 1.6 ↓20.0% |
Agent Harness Optimization
Agent harness optimization improves the prompts, tools, memory, workflows, and control code that shape how AI agents act.
See all 183 papers