NVIDIA's SoL-Pi Slashes Coding Agent Token Use by 49%
NVIDIA Labs released SoL-Pi, a coding agent extension that cuts token cost by roughly one-third using four mechanisms discovered by auto-research loops.
Takeaways
- NVIDIA Labs released SoL-Pi, an MIT-licensed extension for the Pi coding agent focused on token efficiency.
- Four mechanisms: Action Fusion, ObservationPack, Evidence-Preserving Reducer, Online Context Compact, all opt-in.
- On EdgeBench, uses 45-49% fewer tokens and about one-third lower cost than Pi while keeping ~94% of task score.
- Discovered through auto-research loops that filtered 152 proposed ideas down to 4 surviving mechanisms.
- Built and validated across 535 executable environments derived from GitHub issue-PR pairs and synthetic verifier tasks.
- Full methodology and results published on the SoL-Pi research blog.
NVIDIA researchers have released SoL-Pi, an open-source extension for the Pi coding-agent harness that reduces repeated work during long tasks. Its four opt-in mechanisms combine predictable actions, replace replayed output with handles, condense verified evidence, and compact completed context. The team selected those mechanisms through a scaled auto-research pipeline in which agents proposed, implemented, tested, and reviewed harness changes.
A coding-agent harness coordinates the model, conversation history, editing tools, shell commands, and returned observations. As a task stretches across hours, the harness may repeatedly send old context, ingest large tool outputs, write caches, and request extra model turns. Those costs accumulate even when the underlying model and task remain unchanged.
NVIDIA connects this efficiency problem to recursive self-improvement, or RSI, in which AI systems help modify the software and workflows used to develop subsequent AI systems. SoL-Pi tests whether AI-assisted harness research can make those loops cheaper while maintaining a declared capability floor.
Four controls for recurring waste
SoL-Pi installs through npm and runs on an unmodified release of Pi. The extension leaves every mechanism disabled until the developer enables it in configuration, allowing teams to evaluate each change separately.
- Action Fusion lets a file edit or write invoke its follow-up validation command in the same tool call. Analysis of prior trajectories found that edit or write transitions followed by commands represented 12.3% of cross-turn transitions, with Bash accounting for 85.1% of those next actions.
- ObservationPack replaces repeated large text results with stable handles and exact paged recall. It archives the original payload locally, allowing the agent to retrieve specific pages without replaying the entire result.
- Evidence-Preserving Reducer converts long diagnostic logs into compact sets of verbatim evidence. A cheaper model reads the full log first, and every retained quotation must match the archived source before the primary model receives it.
- Online Context Compact considers completed plan steps as possible compaction points. It compacts only when context-window pressure and expected cache savings justify the operation, then resumes the task in a fresh model turn.
Lower cost comes with a capability trade-off
NVIDIA selected EdgeBench because its trajectories can remain open for hours. Terminal-Bench 2.1 and SWE-bench tasks commonly finish within an hour, leaving less time for context replay, large observations, cache writes, and extra model turns to accumulate.
Across EdgeBench, SoL-Pi retained roughly 94% of Pi’s average score on each of the two tested model backends. With GPT-5.6, it also exceeded the model’s native Codex harness. The efficiency results were larger:
- Compared with Pi: SoL-Pi used 45% to 49% fewer tokens and cost about one-third less.
- Compared with native harnesses: It used 35% to 64% fewer tokens, with published API costs falling by 50% to 54%.
On a separate 63-task Terminal-Bench evaluation, SoL-Pi solved three fewer tasks than Codex and Pi. Its total spend and cost per solved task were lower than both baselines.
| Harness | Solved | Total cost | Cost per solve |
|---|---|---|---|
| Codex | 18 of 63 | $272.35 | $15.13 |
| Pi | 18 of 63 | $286.45 | $15.91 |
| SoL-Pi | 15 of 63 | $211.12 | $14.07 |
A 20-worker swarm test used Anthropic’s kernel-optimization take-home. The SoL-Pi swarm produced a kernel measured at 1,127 cycles and incurred $60.11 in API-equivalent model cost, representing 17.5% fewer cycles and 26.8% lower cost than the stock-Pi swarm. A single-agent run cost $39.20, showing that the tested parallel configuration increased total spend despite improving the swarm comparison.
A search funnel from 152 ideas to four
NVIDIA treated harness design as a search problem and began with 152 proposed directions. An Oracle Analysis stage estimated each idea’s opportunity from existing trajectories before allocating rollout resources. Four mechanisms passed the complete evaluation process and entered the release.
Each candidate entered what the paper calls a disposable skill loop:
- Propose a harness change.
- Implement it through a Ralph Loop, which iterates until an explicit exit condition passes.
- Run the candidate in executable environments.
- Measure capability and efficiency.
- Submit the implementation and behavioral contract to a separate reviewer.
- Keep or discard the candidate based on the declared gates.
The training pool contained 535 executable environments drawn from two sources:
- GitHub-derived tasks: The team built 495 environments from paired issues and pull requests. Each repository was reset to its pre-fix commit, and the maintainer’s regression test was hidden from the agent. An environment qualified only when the test failed before the pull request and passed after it.
- Synthetic tasks: Another 40 environments used executable verifiers to determine whether the agent had completed the task correctly.
Two acceptance gates prevented efficiency gains from masking degraded task performance. Every capability metric had to remain within a predeclared tolerance, and at least one efficiency metric had to improve. Candidates that saved tokens by stopping early or omitting required work failed the capability gate.
Install with every feature off
SoL-Pi currently requires Node.js 22.19 or newer and the pinned @earendil-works/pi-coding-agent@0.84.2 package. Install the required Pi version and the extension with:
npm install --global @earendil-works/pi-coding-agent@0.84.2
pi install git:github.com/NVlabs/SoL-Pi
A project-level or user-level sol-pi.json file enables selected mechanisms. NVIDIA’s starter configuration activates Action Fusion and ObservationPack, which make no additional model calls:
{
"version": 1,
"actionFusion": true,
"observationPack": true,
"evidencePreservingReducer": false,
"onlineContextCompact": false,
"cacheWriteReadRatio": 12.5
}
The cacheWriteReadRatio value supplies the assumed cache write-to-read price ratio used by compaction’s economic check. With online compaction disabled in the starter configuration, the field does not activate compaction by itself.
Evidence-Preserving Reducer requires a separate privacy decision because it can send diagnostic logs to a configured reducer model. The repository warns against remote reduction when logs must remain local. Source verification checks quotation fidelity, while confidentiality depends on where the reducer runs and how that provider handles data.
The larger bet is harness optimization
The four released mechanisms apply familiar engineering techniques to agent workloads: batch predictable operations, page large results, preserve traceable evidence, and discard completed context when the economics support it. Their measured value comes from applying those techniques to long trajectories, where small per-turn costs compound.
Breadth-first exploration produced stronger results than repeatedly refining one candidate. Even a strong model using maximum reasoning could continue polishing the same unproductive design after five to ten iterations. Most initial directions still failed validation, with roughly one in 40 reaching the release, but the wider search exposed candidates that depth-first runs missed.
Human involvement bounded the experiment’s autonomy. People supplied early assumptions about useful harness principles, filtered directions before scaling the idea pool, and refactored surviving implementations. The reported evidence therefore covers a hybrid, human-guided auto-research process. Fully autonomous RSI remains outside the experiment’s scope.
Teams running long agent trajectories can evaluate the same optimization surface by tracking task score alongside model turns, replayed context, cache costs, and tool-output size. The MIT-licensed implementation is available in the SoL-Pi repository, and NVIDIA has published the full process on the project blog.