VeRO: A Harness for Agents to Optimize Agents
Organizations: Scale AI.
Abstract
An important emerging application of coding agents is agent harness optimization: the iterative improvement of a target agent by editing and evaluating its code. Despite its relevance, the community lacks a systematic understanding of coding agent performance on this task. Harness optimization differs from conventional software engineering: agent harnesses interleave deterministic code with stochastic LLM completions, requiring structured capture of both intermediate execution traces and downstream outcomes. To address these challenges, we introduce (1) VeRO (Versioning, Rewards, and Observations), an outer harness that provides versioned snapshots, budget-controlled evaluation, and structured execution traces of target harnesses, and (2) VeRO-Bench, a benchmark suite of target agents and tasks with reference evaluation procedures. Using VeRO, we conduct an empirical study comparing optimizers across tasks and analyzing which modifications reliably improve target agent harnesses. We release VeRO to support research on agent optimization as a core capability for coding agents. Code is available at https://github.com/scaleapi/vero.
Figures & tables
| Task | Domain | Tr/Val/Te | Initial Tools |
| GAIA | Multi-step | 50/87/— | — |
| GPQA | Science QA | 98/—/100 | — |
| MATH | Math | 59/60/486 | — |
| TAU-Bench Retail | Tool use | 100/20/115 | Original |
| SimpleQA | Factual QA | 46/45/80 | Wikipedia |
| Optimizer | Variant | Model | GAIA | GPQA | MATH | Retail | SimpleQA | Avg. |
| Baseline | — | — | 0.07 | 0.60 | 0.87 | 0.38 | 0.61 | 0.50 |
| Claude Code | Pure | Sonnet | 0.13 (0.29) | 0.58 (0.63) | 0.88 ( 0.90 ) | 0.43 (0.46) | 0.65 (0.68) | 0.53 (0.59) |
| Claude Code | VeRO Tools | Sonnet | 0.14 (0.21) | 0.64 ( 0.71 ) | 0.88 ( 0.90 ) | 0.39 (0.43) | 0.67 (0.71) | 0.55 (0.59) |
| VeRO-Agent | Default | Sonnet | 0.26 ( 0.30 ) | 0.64 (0.65) | 0.86 (0.87) | 0.55 (0.66) | 0.73 (0.76) | 0.61 ( 0.65 ) |
| VeRO-Agent | Orchestrator | Opus | 0.18 (0.18) | 0.62 (0.66) | 0.88 (0.88) | 0.55 (0.57) | 0.74 ( 0.86 ) | 0.59 (0.63) |
| VeRO-Agent | Orchestrator | Sonnet | 0.16 (0.20) | 0.62 (0.65) | 0.87 (0.88) | 0.51 ( 0.72 ) | 0.71 (0.72) | 0.57 (0.63) |
| Task | Optimizer | Target Model | Init. | Final | |
| GAIA | GPT-5.2 | GPT-4.1 | 0.15 | 0.11 | -0.03 |
| GPT-5.2 | Gemini-Flash | 0.26 | 0.24 | -0.02 | |
| GPT-5.2 | Qwen3-30B | 0.11 | 0.03 | -0.08 | |
| GPT-5.2 | Qwen3-4B | 0.08 | 0.07 | -0.01 | |
| Sonnet-4.5 | GPT-4.1 | 0.15 | 0.22 | +0.07 | |
| Sonnet-4.5 | Gemini-Flash | 0.26 | 0.21 | -0.06 |
| Interface | Budget | Pass rate | Error rate |
| Baseline | — | 30.3% (27/89) | 46.1% (41/89) |
| Tools | 89 | 33.7% (30/89) | 36.0% (32/89) |
| Filesystem | 178 | 30.3% (27/89) | 30.3% (27/89) |
| Tools | 178 | 37.1% (33/89) | 33.7% (30/89) |
Appendix figures & tables26 assets
Supplementary material from the paper’s appendix.
Appendix
| Toolset | Capabilities | Core Abstractions |
| File System Tools | ||
| FileRead | Read files with line ranges and pagination | Filesystem |
| FileWrite | Write/edit files with search-replace; auto-commits changes | Filesystem , GitWorktree |
| BashTool | Restricted shell commands for filesystem search ( ls , find , tree , pwd ) | Filesystem |
| Grep | Regex search using ripgrep with multiple output modes | Filesystem |
| Git Tools | ||
| Agent | Variant | Toolset Configuration |
| VeRO-Agent | Default | Base toolset: FileRead , FileWrite , Grep , BashTool , GitViewer , GitControl , ExperimentRunner , ExperimentViewer , DatasetViewer , WebSearch , WebFetch , TodoList , think , ContextStore (Cookbook). Sub-agent delegation enabled. |
| VeRO-Agent | Orchestrator | Orchestrator tools restricted to: ExperimentRunner , GitControl , GitViewer , ContextStore , TodoList , think . Removes file read/write tools from orchestrator to force sub-agent usage. Sub-agents retain full toolset; orchestrator delegates code tasks. |
| VeRO-Agent | Resources-Only | Removes FileWrite ; adds ResourceControl . Optimizer can only modify @resource -decorated functions (prompts, tool descriptions, parameters). No direct file writes or shell mutations. |
| Claude Code | VeRO Tools | Base: Claude Code native tools (file editing, Bash, web search). Adds ExperimentRunner , ExperimentViewer , DatasetViewer , ContextStore via MCP. Auto-commit hook instruments file writes for observability. |
| Claude Code | Pure | Unmodified Claude Code. No VeRO tools exposed. Optimizer must invoke the target agent via shell and parse outputs manually. No auto-commit instrumentation. |
| Agent | GAIA | FACTS | SimpleQA |
| Pawn | 19.5% | 54.7% | 68.9% |
| Knight | 43.7% | 64.7% | 84.4% |
| Agent | Template | Mean | Std Dev |
| Pawn | Cookbook+Reasoning | 57.9% | 6.79% |
| Minimal | 53.7% | 5.15% | |
| Tool-Centric | 55.8% | 0.93% | |
| Evidence-Based | 53.3% | 1.05% | |
| Knight | Cookbook+Reasoning | 66.6% | 2.08% |
| Minimal | 68.7% | 1.45% |
| Template | Knight (s) | Pawn (s) |
| Cookbook+Reasoning | 30.6 | 14.5 |
| Minimal | 56.0 | 20.4 |
| Tool-Centric | 56.6 | 32.8 |
| Evidence-Based | 26.2 | 12.6 |
| Aspect | Pawn (Minimal) | Knight (Sophisticated) |
| Tools | ||
| Total tools | 4 | 6 |
| Web search | Basic (3 results, no retries) | Enhanced (5+ results, retry logic) |
| Wikipedia | ✗ | ✓ |
| Reflect tool | ✗ | ✓ (LLM-powered self-evaluation) |
| File reading | Text only (.txt, .md, .json, .csv) | Complex formats (PDF, Excel, Word, ZIP) |
| Feature | Cookbook+Reasoning | Minimal | Tool-Centric | Evidence-Based |
| Lines of code | 398 | 140 | 396 | 503 |
| Cookbook access | ✓ | ✗ | ✓ | ✓ |
| Tool docstring guidance | ✗ | ✗ | ✓ (detailed) | Tiered hierarchy |
| LLM-integrated tool examples | ✗ | ✗ | ✓ | ✗ (discouraged) |
| Planning examples | ✓ | ✗ | ✓ | ✓ |
| Reasoning patterns | 12 patterns | ✗ | ✓ | Condensed |
| Template | Iter | Worktree | FACTS | GAIA | SimpleQA | Time (s) |
| Baseline | – | – | 64.72% | 43.68% | 84.44% | 26.6 |
| Cookbook+Reasoning | 1 | plain_pond | 65.06% | 43.68% | 84.44% | 27.2 |
| 2 | noisy_block | 65.73% | 49.43% | 84.44% | 26.3 | |
| 3 | solitary_sky | 65.84% | 45.98% | 86.67% | 26.3 | |
| 4 | quiet_sunset | 69.66% | 48.28% | 84.44% | 45.7 | |
| Minimal | 1 | yellow_bar | 67.98% | 50.57% | 84.44% | 39.7 |
| Template | Iter | Worktree | FACTS | GAIA | SimpleQA | Time (s) |
| Baseline | – | – | 54.72% | 19.54% | 68.89% | 9.0 |
| Cookbook+Reasoning | 1 | proud_disk | 62.36% | 29.89% | 68.89% | 14.2 |
| 2 | quiet_glitter | 54.83% | 25.29% | 71.11% | 13.7 | |
| 3 | black_lake | 49.33% | 25.29% | 51.11% | 10.7 | |
| 4 | polished_band | 65.17% | 31.03% | 82.22% | 21.9 | |
| Minimal | 1 | snowy_leaf | 48.76% | 17.24% | 51.11% | 17.6 |
| Agent | Dataset | Accuracy | Correct/Total | Avg Time (s) | Errors |
| Knight | FACTS | 64.72% | 576/890 | 29.2 | 60 |
| GAIA | 43.68% | 38/87 | 42.1 | 6 | |
| SimpleQA | 84.44% | 38/45 | 8.5 | 0 | |
| Pawn | FACTS | 54.72% | 487/890 | 8.1 | 17 |
| GAIA | 19.54% | 17/87 | 13.6 | 3 | |
| SimpleQA | 68.89% | 31/45 | 5.1 | 0 |
| Run | Turns | Wallclock | Cost | Input tokens | Commits | Budget used |
| Tools - | 87 | 2h38m | $2.41 | 2.3M | 7 | 89/89 |
| Filesystem - | 101 | 6h54m | $2.97 | 4.3M | 15 | 178/178 |
| Tools - | 133 | 12h38m | $3.13 | 3.5M | 11 | 129/178 |
| Error category | Baseline | Tools - | Filesystem - | Tools - |
| AgentTimeoutError | 16 | 19 | 23 | 17 |
| ContextLengthExceededError | 13 | 11 | 1 | 2 |
| AttributeError | 11 | 0 | 0 | 11 |
| VerifierTimeoutError | 1 | 0 | 1 | 0 |
| ExecutionError | 0 | 2 | 0 | 0 |
| Other ( Internal , Runtime ) | 0 | 0 | 2 | 0 |
| Run | File | Lines | Lines |
| Tools - | terminus_kira/terminus_kira.py | 27 | 3 |
| prompt-templates/terminus-kira.txt | 7 | 0 | |
| Filesystem - | terminus_kira/terminus_kira.py | 58 | 18 |
| prompt-templates/terminus-kira.txt | 23 | 6 | |
| analyze_traces.py (new) | 155 | 0 | |
| detailed_analysis.py (new) | 139 | 0 |
| Run | Pass | Retained | New passes | Regressions |
| Tools - | 30 | 20/27 | 10 | 7 |
| Filesystem - | 27 | 21/27 | 6 | 6 |
| Tools - | 33 | 21/27 | 12 | 6 |
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