Nvidia researchers have built SoL-Pi, a system that automatically optimizes the control layer of coding agents and cuts token consumption by up to 49% while keeping task performance near baseline. The work targets the harness, the layer that governs how agents in systems such as Codex, Claude Code or OpenClaw observe state, call tools and process feedback. For businesses running long unsupervised agent sessions, this matters because token bills grow with every reasoning step and tool loop.

Nvidia SoL-Pi cuts coding agent token use by 49% with leaner harness

How SoL-Pi searches for leaner logic

SoL-Pi works as a research agent that watches execution traces of another agent, proposes harness changes and tests them in prepared environments. The search ran across 535 executable environments, including 495 tasks built from GitHub issue-pull-request pairs and 40 synthetic test cases. In total it produced more than 3,000 runs and over 60,000 agent-environment interactions. To limit overfitting, the team kept search feedback separate from evaluation: EdgeBench was isolated from search, with 11 of its 51 public tasks used for one-time validation and the remaining 40 reserved for final scoring.

The search yielded four mechanisms that can be used together or separately. Action Fusion merges two consecutive steps, such as a code edit followed by a test run, into one and removes an entire model call. Online Context Compact runs after each planning step and trims accumulated context when no important information is lost. ObservationPack archives long tool outputs and substitutes a short summary on later steps instead of resending full text. The Evidence-Preserving Reducer sends large error and test logs to a cheaper model for condensation to key findings, with automatic verification to catch missing clues.

On EdgeBench public tasks, the full combination used 49% fewer tokens and reached 93.7% of the original Pi harness score, while the strongest single mechanism exceeded Pi by 5.3% and still saved tokens. The authors translate this into savings of $8.75 to $13.50 per hour versus native Codex and Claude Code harnesses and $4.36 to $5.71 per hour versus Pi at current API prices. The pressure behind such work is visible elsewhere: agentic token use grew 14x since February 2026 according to OpenRouter analyst Peter Walker, and Composio found in August that cost per solved task varied by nearly 3x across four frameworks running the same Deepseek V4 Flash model.

What this means for companies running agents

For companies operating coding agents at scale, the result points to the harness as a direct lever on operating cost. Savings appear in long sessions with repeated edits, test runs and error-log processing, where merged actions and compressed context remove repeated model calls and repeated transmission of tool output. A large deployment running many parallel hours would feel the per-hour dollar difference first, while a smaller team would notice lower cost per solved task on routine fixes. In one test run cited by the authors, total cost fell from $1,339 to $894 despite reduced prompt cache reuse, and a swarm of 20 SoL-Pi workers cut kernel-optimization costs by 26.8% against a comparable Pi swarm.

The same results show limits that buyers should verify before adopting similar logic. On 63 CPU tasks from Terminal-Bench 4, SoL-Pi solved 15 tasks against 18 each for Codex and Pi, even though total cost was about a quarter lower. Transfer to another model was partial: built with GPT-5.6 Sol only and applied unchanged to Opus 5, the system kept 94.3% of Pi performance with similar savings but triggered less often. Separate research cited in the report warns that compression preserves only 17% of user instructions on average, and Codex developer Eric Provencher notes that more than two sub-agents often burn tokens checking each other without quality gains.

A concrete marker to follow is whether harness optimization moves from one-off search to pretraining across many tasks. The authors describe pretraining the harness and using an already lean harness to search for its successor, a concept they label recursive efficiency improvement. If future papers or products show a pretrained harness holding token savings on unseen benchmarks without score loss, businesses can treat harness efficiency as a durable procurement criterion rather than a single experiment.