Original Reddit post

90% of Claude’s code is now written by Claude. Recursive self-improvement is already happening at Anthropic. What if you could do the same for your own agents? I spent months researching what model providers and labs that charge thousands for recursive agent optimization are actually doing, and ended up building my own framework: recursive language model architecture with sandboxed REPL for trace analysis at scale, multi-agent pipelines, and so on. I got it to work, it analyzes my agent traces across runs, finds failure patterns, and improves my agent code automatically. But then I realized most people building agents don’t actually need all of that. Claude Code is (big surprise) all you need. So I took everything I learned and open-sourced a framework that 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. I tested it on a real-world enterprise agent benchmark (tau2), where I ran the skill fully on autopilot: 25% performance increase after a single cycle. Welcome to the not so distant future: you can now make your agent recursively improve itself at home. How it works: 2 lines of code to add tracing to your agent (or go to step 3 if you already have traces) Run your agent a few times to collect traces Run /recursive-improve in Claude Code The skill analyzes your traces, finds failure patterns, plans fixes, and presents them for your approval Apply the fixes, run your agent again, and verify the improvement with /benchmark against baseline Repeat, and watch each cycle improve your agent Or if you want the fully autonomous option (similar to Karpathy’s autoresearch): run /ratchet to do the whole loop for you. It improves, evals, and then keeps or reverts changes. Only improvements survive. Let it run overnight and wake up to a better agent. Try it out Open-Source Repo: https://github.com/kayba-ai/recursive-improve Let me know what you think, especially if you’re already doing something similar manually. submitted by /u/cheetguy

Originally posted by u/cheetguy on r/ClaudeCode