Recursive Self-Improvement Framework for AI Coding Agents Using Claude Code

A developer has open-sourced a framework that enables AI coding agents to recursively improve themselves using Claude Code. The system was developed after months of research into how model providers implement recursive agent optimization.
How It Works
The framework provides a structured approach to agent improvement:
- Add tracing to your agent with 2 lines of code (or skip to step 3 if you already have traces)
- Run your agent multiple times to collect execution traces
- Run
/recursive-improvein Claude Code - The system analyzes traces, finds failure patterns, plans fixes, and presents them for approval
- Apply fixes, run agent again, and verify improvement with
/benchmarkagainst baseline - Repeat cycles to continue improvement
Autonomous Option
For fully autonomous operation (similar to Karpathy's autoresearch):
- Run
/ratchetto execute the entire improvement loop automatically - The system improves, evaluates, and keeps or reverts changes
- Only improvements survive
- Can run overnight to wake up to a better agent
Performance Results
Tested on a real-world enterprise agent benchmark (tau2) with the skill running fully on autopilot:
- 25% performance increase after a single improvement cycle
Technical Background
The original research involved building a recursive language model architecture with sandboxed REPL for trace analysis at scale, multi-agent pipelines, and other components. The developer discovered that most people building agents don't need this complexity and that Claude Code provides sufficient capability for recursive self-improvement.
The framework tells your coding agent: here are the traces, here's how to analyze them, here's how to prioritize fixes, and here's how to verify them.
Open-source repository: https://github.com/kayba-ai/recursive-improve
📖 Read the full source: r/ClaudeAI
👀 See Also

Mozilla Thunderbolt: Open-Source Enterprise AI Client for Self-Hosted Infrastructure
Mozilla announced Thunderbolt, an open-source AI client under MPL 2.0 license designed for organizations to deploy self-hosted AI infrastructure with model choice, enterprise data integration, and cross-platform native applications.

md-redline: GUI tool for reviewing and handing off markdown docs to Claude
md-redline is an open-source tool that lets you open markdown files in a GUI, leave inline comments stored as HTML markers in the .md file, and hand back off to Claude for updates. It runs locally with no account, cloud, or database required.

Steam City: A 3D Pixel-Art Map of Your Steam Library Built with Claude Code
A developer used Claude Code to build Steam City, a 3D pixel-art visualization of your Steam library. Playtime hours determine building height, unplayed games sit dark. 1,000+ players already.

Godmode Plugin Adds Autonomous Iteration Loop to Claude Code and Other AI Coding Agents
Godmode is an open-source plugin that adds an autonomous measure-modify-verify loop to Claude Code, with parallel agents, failure memory, and 126 skills including optimization, security audits, and TDD. It works with Cursor, Codex, Gemini CLI, and OpenCode.