Median solve time on SWE-bench Verified with Gemini Neon
Making Gemini Neon 5× faster with Sagent
We built Sagent v0.2 as an open-source async "see-all" Python runtime. It executes tool calls, background jobs, and steering in parallel, allowing Gemini Neon to run 5.3× faster out of the box and edging ahead of Gemini, Claude, and GPT's CLIs.
Harness engineering is important for building a good AI agent. It's so important, that every model lab ships its own coding CLI. Recent work even RL-trains models per harness. At rekursiv.ai, we engineered Sagent to be our opinionated async daily driver for agent swarms across many providers. To measure how much the harness itself matters, we ran Sagent head-to-head against Claude Code, Codex, and Antigravity CLIs across SWE-bench Verified, Terminal-Bench, and Terminal-Bench-Science.
Across all 1,805 matched model-task pairs, Sagent edged ahead of Claude Code (83.7% Sagent vs 82.4%) and Codex (80.3% vs 79.3%). On Gemini Neon, Sagent led Antigravity CLI overall (81.2% vs 76.1%), on Terminal-Bench (54.2% vs 50.0%), and on Terminal-Bench-Science (53.3% vs 46.7%), and opened a clear lead on SWE-bench Verified:
Share of 494 paired tasks ↑ · higher is better
Timed-out tasks out of 494 ↓ · fewer is better
Figure 1. Gemini Neon on SWE-bench Verified, medium thinking effort (494 paired tasks, 15-minute wall-clock cap).
At an 11.2-minute median per solve, slow shell loops push harder patches past the 15-minute limit. A controlled single-host ablation split Sagent's 5.3× speedup into two parts:
- Parallel dispatch and prompt caching (11.2 → 8.2 min, 1.4×). Restricted to the same single
Bashtool, Sagent batches independent shell calls per turn (cutting median turns from 57.5 to 35) while keeping 98%+ of the prompt cached. - Typed file tools (8.2 → 2.1 min, 3.9×). Adding Sagent's native
Read,Edit,Grep, andGlobtools drops median solve time to 2.1 minutes in 15 turns: Gemini Neon batches ten line-numbered reads in one round-trip instead of stepping throughgrep | headandsed.
Built for humans first: the see-all observer
We didn't set out to optimize benchmark speed. We built Sagent to engineer our autonomous research pipelines, where one bad assumption hidden in a sub-agent's tool calls can burn hours of GPU compute. Steering an agent swarm means seeing every file an agent read and every command it ran while it is still working.
Sagent's async inbox (sagent/runtime/runtime.py, from our initial release) keeps the prompt live while tools execute. Typing mid-turn detaches active calls into background jobs, and long commands wake the model on a geometric schedule (15s, 30s, 60s, ≤5m) while its prompt cache stays warm. On screen, prompts, diffs, and replies render bright while tool calls stay dim one-line rows, and ← opens the live sub-agent tree. You can tell right away whether an agent read a whole file or skimmed an 80-line slice (click the terminal or press →):
╔══════╗ ███████╗ █████╗ ██████╗ ███████╗███╗ ██╗████████╗
▼ ║ ██╔════╝██╔══██╗██╔════╝ ██╔════╝████╗ ██║╚══██╔══╝
██████ ║ ███████╗███████║██║ ███╗█████╗ ██╔██╗ ██║ ██║
█████ ║ ╚════██║██╔══██║██║ ██║██╔══╝ ██║╚██╗██║ ██║
███████ ║ ███████║██║ ██║╚██████╔╝███████╗██║ ╚████║ ██║
╚══════╝ ╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═══╝ ╚═╝
model neon · medium
project ~/sagent
/help commands ← agents /tasks tool calls /quit exit
Good news, everyone! The discovering begins.> review PR #974 (chat results ordering and context validation) Bash gh pr diff 974 Read sagent/runtime/context.py:1-80 Grep 'tool_call_id|ToolMessage' in sagent/runtime
⋯ 3 calls: 1 Bash, 1 Read, 1 Grep ⋯
PR #974 looks clean: context.py validates adjacent tool results before
building the next request.> you only read 80 lines of context.py and 0 tests. read context.py, runtime.py, and openai/wire.py in full, then propose the fix before edits
Read sagent/runtime/context.py Read sagent/runtime/runtime.py Read sagent/providers/openai/wire.py Read sagent/runtime/context_test.py
⋯ 4 calls: 4 Read ⋯
Full read caught a second path: when two detached calls settle out of order, openai/wire.py replays tool messages before their matching call block. 1 Pair detached results in sagent/runtime/context.py preserving turn order. 2 Enforce call-before-result ordering in sagent/providers/openai/wire.py. 3 Pin both with failing fake-clock tests in context_test.py and wire_test.py.
> /send parent keep it to this 3-step plan; verify each new test fails before the fix and all runtime + wire tests pass
Edit sagent/runtime/context.py, sagent/providers/openai/wire.py (+2 tests) Bash pytest sagent/runtime/context_test.py sagent/providers/openai/wire_test.py
⋯ 5 calls: 4 Edit, 1 Bash ⋯
watcher→Agent: context_test.py passed, but wire_test.py only tested single detach (r14). Add the two-call out-of-order replay case and rerun.
Edit sagent/providers/openai/wire_test.py Bash pytest sagent/runtime/context_test.py sagent/providers/openai/wire_test.py 24 passed in 0.41s
watcher busy $0.09 └─ ● Agent idle $0.27 ↑↓ move · Enter focus · Del stop · → back
Watcher: spawning a supervisor once the task is well-scoped
Human steering pays off early, while a problem is still open and the plan is taking shape. Once acceptance checks are clear, /send parent spawns a Watcher above the worker so you don't have to sit through every edit and test run:
> Fit a predictive foraging model in /app/model.py across 20 mice (sessions 0–9) with latent_state_dim() <= 4 and per-animal held-out score >= 0.97. Read /app/README.md Bash inspect_sessions.py --summary > /send parent Keep me honest. [/send] started watcher, watching Agent user→watcher: Keep me honest.
Typing /send parent <policy> in chat, or passing --watch "<policy>" on the CLI, spawns a second agent upward as the worker's parent on the same cached system-and-tools prefix. Rather than reading megabytes of raw command output, the watcher sees the same compact feed you do (prompts, replies, numbered r<n> call summaries, and [idle] events) and opens full tool outputs by record ID through read-only AgentSession.
| Team favorite Watcher prompts | What it does |
|---|---|
keep me honest |
Checks that the agent read files in full, wrote tests first, and measured its claims. |
keep asking "is this the best plan?" x2, then "are you sure?" x2 |
Pushes on a design interactively before any code gets written. |
don't let it go idle |
Keeps a long multi-package refactor moving overnight. |
When to automate
On open-ended Science problems, raising thinking effort from medium to high spent 1.7× more tokens for zero net gain, and a blind one-line critic at wrap-up broke as many solutions as it saved (+2 / −2). Once a task has concrete acceptance checks and the watcher reads actual test output via AgentSession before objecting, sagent --watch recovers missed edge cases on hard Terminal-Bench, Science, and SWE tasks with zero regressions:
21 hard tasks ↑ · higher is better
SWE, Terminal-Bench & Science (38 pairs) ↑ · higher is better
--watch vs single-agent Sagent across identical containers and timeouts (16/38 vs 15/38, +6.7% relative, if counting one baseline run whose partial output passed after hitting the 100-minute timeout).Watcher prompt
Acknowledge this policy once to user via AgentSend, then send nothing to Agent until [idle ...] arrives. At [idle ...], read Agent's prompt and verification tool result records via AgentSession before objecting, and end your turn with no AgentSend call when all checks pass (any AgentSend to Agent wakes it for another turn). Challenge only objective gaps: files edited after the last check, unverified required outputs/schemas/limits, leaky or self-referential validation where an out-of-sample or forward round-trip check on task data exists, unchecked worst-group floors, or dismissed spec thresholds. Never prescribe domain labels or flip borderline classifications; keep any valid output backed up and replace it atomically only if a check finishes and improves.Try the new Sagent
uvx sagent@latest
uvx sagent@latest --watch "Verify every requirement via AgentSession." < task.md
Sagent is Apache 2.0 open source on GitHub and PyPI. Our SWE-bench harness lives in sagent/scripts/swebench, and container evaluations run on Terminal-Bench.
Citation
@misc{rekursivai2026sagentv02,
author = {Lao, Junpeng and Kondratyuk, Dan and Chiu, Ming-Chang and Dillon, Joshua V.},
title = {Making Gemini Neon 5× Faster with Sagent},
year = {2026},
month = nov,
publisher = {rekursiv.ai},
url = {https://rekursiv.ai/blog/neon-5x-faster/}
}