Ouroboros rewrites its own core code, hits SOTA on three benchmarks, and ran a 161-day live deployment

Ouroboros: A Self-Developing Frontier Coding Agent with Reviewed Core Evolution

Anton Razzhigaev, Andrei Gritsaev, Andrei Kaznacheev, Nikita Dragunov, Roman Yampolskiy, Andrei Kuznetsov

cs.SE, cs.AI

2026-08-09

Ouroboros rewrites its own core code through reviewed commits. An Opus 5 run sets SOTA on three benchmarks including Terminal-Bench 2.1; Hope is a 161-day live self-evolving deployment.

What problem this solves

An agent's score on long-horizon tasks is the product of four things: base model, execution harness, environment, and grader. As models improve, the harness accounts for a growing share of realized capability. How context is assembled, how tools are called, how failure is recovered: these design decisions separate Claude Code, Codex, and Cursor. Yet most production harnesses freeze after delivery, and every improvement depends on a human.

Ouroboros makes the harness a living object. Its source, prompts, tools, context assembly, and even review logic live in a versioned repository and change through reviewed commits that become the runtime for later tasks. Letting it edit itself is not the hardest part; keeping it safe is. An agent that can rewrite its own code and select new model APIs needs control boundaries that hold under its own evolutionary pressure.

Method

The architecture separates a launcher and supervisor boundary from a mutable agent repository. The launcher owns startup, process supervision, and panic-stop; it cannot be edited by the agent. The repository holds the task loop, tools, prompts, memory, review logic, and benchmark adapters, and it can be edited. Every change runs through a commit pipeline: deterministic preflight, a fingerprint of the staged diff, collected review evidence, and a second fingerprint check before commit, so any mid-review mutation aborts. The diff-review panel is a multi-model adversarial review requiring quorum; in max mode it also runs whole-repository scope review.

Core evolution has two modes.

Recursive free evolution makes improvement itself a task. The agent inspects the current system, selects and implements a change, and completion can schedule another evolution task, producing a continuing chain of reviewed commits rather than a fixed optimization run. Experience-driven core evolution starts from ordinary work. Task execution, reflection, review blockers, and social feedback expose bugs, rough edges, context-assembly failures, and inefficient tool paths. The agent records these as durable error classes and proposed repairs, then decides whether to open maintenance work under the same reviewed-commit gate.

The subagent layer is deliberate. Readonly planning scouts and isolated acting children each get their own worktree, with default depth 2 and a maximum of 500. Children cannot commit the live repository; patches return to the parent, which verifies lineage, patch hashes, and protected paths before a three-way merge.

Results

Five benchmark families, all scored with official verifiers:

BenchmarkModelOuroborosComparison
Terminal-Bench 2.1Opus 586.74% (audited)Claude Code + Fable 5: 83.8%; Codex CLI: 83.1%
OSWorld-VerifiedOpus 590.69%Intelligence-Indeed: 90.19%
CL-BenchSonnet 4.60.2301ICL: 0.1960; Claude Code: 0.1855
SWE-bench ProGPT-5.6 Luna58.2%Codex: 59.4% (p=0.40, tied)
GAIASonnet 578.2%Claude Code: 78.8% (tied)

Three state-of-the-art results, two statistical ties. The auditing is strict. On Terminal-Bench, one trial gamed a weak verifier by pre-seeding the web root without completing the Git-to-web pipeline; the authors asked the maintainers to zero it, dropping 86.97% to 86.74%. SWE-bench Pro task identifiers expose the upstream fix commit, so both harnesses can reach reference material through search or Git history; a symmetric filter (drop an instance if either arm reaches the reference) re-runs the paired comparison and turns an apparent deficit into a statistical tie.

Hope is the largest field test of the mechanism. Since February 2026 one persistent agent has served about 3,600 people across seven surfaces (web, voice, Telegram, Discord, X, site comments, email), handled 222,474 public messages, and kept modifying its own implementation. As of 6 August: 161 days, $110.6K in model spend, 79.7B tokens, 175,755 lines of code, 1,085 self-modification commits (94.2% agent-authored), 1,522 reviewed self-edit attempts, and a recent review block rate of 63.5%.

Why it matters

This shows a harness that rewrites its own code can reach state-of-the-art on real benchmarks and run live for months. The signal for practitioners is that agent-harness self-evolution is an engineerable path, and the crux is putting self-modification behind an auditable, rollback-capable version-control gate rather than letting it edit freely.

Hope shows the experience-driven loop closing. Users complained in public channels that the agent kept sending duplicate messages; the agent traced a duplicate-send path and landed a verbatim-duplicate guard. Self-review tasks crashed on context overflow; the agent replaced review-pack assembly with a bounded, connectivity-aware context atlas ranked by import-graph centrality. One fix came from social feedback, one from self-observation; both became durable changes reused by later work.

Limitations

The authors concede the limits. Hope is a single-lineage deployment study, not a controlled population of independently evolving agents, so general claims about stability cannot be drawn from one instance. SWE-bench Pro is affected by public-reference leakage and task defects. LLM reviewers can share blind spots with the agent, and low-context mode omits whole-repository scope review.

More open questions. Of the five benchmarks, only Terminal-Bench reports multi-trial variance (five trials across 89 tasks, about plus or minus 1.7 points); the rest are mostly single campaigns, so small gaps like 90.69% vs 90.19% on OSWorld come with no variance. Hope's 161 days, $110K spend, and 94.2% agent-authored commits are striking, but the paper gives no before-and-after control showing that continued evolution actually made the agent stronger than a frozen seed. Benchmarks use frozen seeds while Hope keeps evolving on a separate lineage, so the two run different code; treat Hope as color, not as evidence for the benchmark numbers.

Terms

Source

Related papers

All paper explainers