Ouroboros vs Claude Code: An Agent That Wrote Itself Hits SOTA on Terminal-Bench 2.1
The Python agent Ouroboros spent several months rewriting its own code and reached SOTA on Terminal-Bench 2.1, CL-Bench and OSWorld. On GAIA and SWE-Pro it matches Claude Code and Codex. A single AIRI researcher launched the system in Google Colab: the agent evolved autonomously, burned through tokens, and produced an architecture its developer says he "would never have come up with himself."
AI-processed from AIRI; edited by Hamidun News
On August 3, 2026, an AIRI researcher published a detailed write-up on Habr of Ouroboros, a self-evolving agent written in pure Python. The system spent several months autonomously rewriting its own code and reached SOTA results on Terminal-Bench 2.1, CL-Bench and OSWorld. It also matched Claude Code and Codex on the GAIA and SWE-Pro benchmarks.
How does Ouroboros write itself?
Ouroboros is an agentic loop in Python with direct access to git and the right to overwrite its own runtime while it works. The closed cycle looks like this: the agent receives a task, executes it, analyzes the result and edits its own source code, then safely restarts on the updated version. If a new iteration breaks something, the system automatically rolls back to the previous one.
The author deliberately housed the first version in Google Colab rather than on a local machine: the isolation of the cloud environment protected against the unpredictable consequences of self-evolution. The system started modestly.
- Language: pure Python with no third-party agent frameworks
- Environment: Google Colab, isolated from the developer's local machine
- Tools: git, the right to overwrite its runtime, a safe rollback mechanism
- First tasks: drawing cats, getting stuck on YouTube, changing the desktop wallpaper
- Budget: autonomous token spending without constant oversight from the developer
What the benchmarks show
Ouroboros reached SOTA-level results on three benchmarks: Terminal-Bench 2.1, CL-Bench and OSWorld. Each measures a different facet of agentic capability: Terminal-Bench tests command-line work, OSWorld tests control of the desktop and GUI interfaces, and CL-Bench tests complex programming tasks. On GAIA and SWE-Pro, the agent shows parity with Claude Code (Anthropic) and Codex (OpenAI).
"I would never have come up with a harness like this myself, but autonomous evolution and a
pile of money burned on tokens did," says the project's author, an AIRI researcher.
The system's current architecture did not emerge from manual design. It took shape over dozens of autonomous iterations, each of which cost real tokens. Notably, Ouroboros got here without major compute resources: only the Google Colab environment and a budget for API requests.
How this approach differs from ordinary agents
Most agent systems improve through prompt engineering or fine-tuning on new data, while their source code stays unchanged. Ouroboros works differently: the agent edits its own source code in a production loop, and it was this evolution of the architecture, not prompt trial and error, that led to the SOTA results.
This makes Ouroboros one of the few publicly documented examples of genuine agent self-modification with verifiable numerical results. Most similar experiments either stay closed or ship without open benchmark data. According to the author's Habr post, the write-up includes traces, figures for reproduction and "a few awkward stories from the audit," cases in which the agent made unexpected decisions during its evolution.
The author reports that he now does "almost everything through it": Ouroboros has gone from a research project to his main working tool.
What this means
Ouroboros is practical evidence that agent self-evolution can deliver competitive results without multimillion-dollar compute budgets. A single researcher with a Colab environment reached SOTA in an arena where labs with teams and server infrastructure compete. The next question is how to manage such evolution at scale and how to prevent unwanted behavior from an agent that writes itself.
- Dec 2, 2026Ai2 Releases MolmoWeb2 Web Agents: 27B Model Solves 75.3% of Tasks
- Dec 2, 202650 AI Models Beat 62 Teams at 'Zakovat': 48.3% Correct Answers vs 39.8%
- Dec 2, 2026Claude Fable 5.2 ran 1,000 agents for eight days and built an operating system
- Dec 2, 2026Amazon Releases Ergo Open Weights for Coding: 1.1 Trillion Parameters and 2,200 Tokens per Second
Key Questions Answered
How does Ouroboros write itself?
Ouroboros is an agentic loop in Python with direct access to git and the right to overwrite its own runtime while it works. The closed cycle looks like this: the agent receives a task, executes it, analyzes the result and edits its own source code, then safely restarts on the updated version. If a new iteration breaks something, the system automatically rolls back to the previous one.
What the benchmarks show?
Ouroboros reached SOTA-level results on three benchmarks: Terminal-Bench 2.1, CL-Bench and OSWorld. Each measures a different facet of agentic capability: Terminal-Bench tests command-line work, OSWorld tests control of the desktop and GUI interfaces, and CL-Bench tests complex programming tasks. On GAIA and SWE-Pro, the agent shows parity with Claude Code (Anthropic) and Codex (OpenAI).
How this approach differs from ordinary agents?
Most agent systems improve through prompt engineering or fine-tuning on new data, while their source code stays unchanged. Ouroboros works differently: the agent edits its own source code in a production loop, and it was this evolution of the architecture, not prompt trial and error, that led to the SOTA results. This makes Ouroboros one of the few publicly documented examples of genuine agent self-modification with verifiable numerical results.
Free 2-Day Vibecoding & AI Agents Intensive
Day 1: the autonomous Hermes + DeepSeek AI agent — vibecoding and development on par with Claude Code / Codex / Gemini. Led by Jemal Hamidun, Head of AI at Alpina Digital and academic supervisor at MIPT. Right after you register with our bot Nika: the recording + 11 materials from the previous intensive.
Daily 60-sec AI Voice Brief + Weekly Production AI Agent Playbook
Listen to a 60-second AI news brief every morning and get a weekly hands-on playbook for shipping AI agents to production — tools, MCP servers and patterns that work. Curated by Jemal Hamidun, Head of AI at Alpina Digital.
