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

Open-source Gmail MCP server adds multi-account support and write access
An open-source MCP server enables Claude AI to connect to multiple Gmail accounts with full read/write capabilities, including archiving, labeling, and auto-unsubscribe functionality. It supports Gmail search syntax and can be deployed to Railway in 5 minutes or self-hosted.

Microsoft BitNet: 1-bit LLM inference framework for CPU and GPU
Microsoft released BitNet, an inference framework for 1-bit LLMs that achieves 1.37x to 6.17x speedups on CPUs and reduces energy consumption by 55.4% to 82.2%. It can run a 100B parameter model on a single CPU at 5-7 tokens per second.

OpenHelm: A macOS App for Automating Claude Code Tasks
OpenHelm is a free, local macOS application that automates repetitive Claude coding tasks by running jobs on a schedule, auto-retrying failures, and breaking work into chunks to avoid session limits. It uses your existing Claude subscription for LLM calls.

Claude Code Best Practice Repo Hits 50k Stars, Built Entirely with AI Agents
A GitHub repository packed with Claude best practices, 100% developed and maintained by autonomous Claude code workflows, crossed 50,000 stars — making it Pakistan's most-starred repo in 2026.