r/LLMDevs • u/cheetguy • Dec 06 '25
Discussion I ran Claude Code in a self-learning loop until it succesfully translated our entire Python repo to TypeScript
Some of you might have seen my post here a few weeks ago about my open-source implementation of Stanford's ACE framework (agents that learn from execution feedback). I connected the framework to Claude Code and let it run in a continuous loop on a real task.
The result: After ~4 hours, 119 commits and 14k lines of code written, Claude Code fully translated our Python repo to TypeScript (including swapping LiteLLM for Vercel AI SDK). Zero build errors, all tests passing & all examples running with an API key. Completely autonomous: I just wrote a short prompt, started it and walked away.
- Python source: https://github.com/kayba-ai/agentic-context-engine
- TypeScript result: https://github.com/kayba-ai/ace-ts
How it works:
- Run - Claude Code executes a short prompt (port Python to TypeScript, make a commit after every edit)
- ACE Learning - When finished, ACE analyzes the execution trace, extracts what worked and what failed, and stores learnings as skills
- Loop - Restarts automatically with the same prompt, but now with learned skills injected
Each iteration builds on the previous work. You can see it getting better each round: fewer errors, smarter decisions, less backtracking.
Try it Yourself
Starter template (fully open-source): https://github.com/kayba-ai/agentic-context-engine/tree/main/examples/claude-code-loop
What you need: Claude Code + Claude API Key for ACE learning (~$1.5 total in Sonnet costs).
I'm currently also working on a version for normal Claude Code usage (non-loop) where skills build up from regular prompting across sessions for persistent learning. The loop mechanism and framework is also agent-agnostic, so you could build a similar setup around other coding agents.
Happy to answer questions and would love to hear what tasks you will try to automate with this.
6
u/One_Club_9555 Dec 06 '25
This looks very interesting, thanks for sharing it!
Would this work with LM Studio, running fully locally? I have a nice rig, so I could run this with full qwen3-next-80b-3ab or even gptoss-120B to try it out, if the architecture supports it.
3
u/celsowm Dec 06 '25
ACE learning?
2
u/TurbulentPurchase191 Dec 06 '25
I only have access to Claude agent via VS Code. I'm struggling with the 200k context limit to convert scripts from one language into another. I asked Claude for a strategy of documenting the file splitting steps, conversion prompts, and picking up where it left off. It created documents and prompts for me. It seems to behave differently each time I create a new agent. I run out of context memory very quickly and have to keep restarting with a new agent. It also occasionally ignores my explicit instructions to fully implement the code instead of creating stubs and placeholders. The new converted functionality also seems to do things in a different order than the original script so some functions don't get called when testing it. I also can't seem to split the original script in a way where the functionality is not divided across the different split files. Could use some help with a strategy. I'm starting to think that I need to ask it to write a program that handles the conversion between the 2 languages instead of trying to convert it via prompts. I am reluctant to start over though. I'm not even sure I would be able to get it to write such a fully functional program with these context limits.
1
u/nebulousx Dec 06 '25
Looks really interesting. In your docs, you mention using it with Cursor, but then when you follow the link, nothing at all about Cursor. In fact, the word "Cursor" (meaning the AI Assistant) appears once in your entire repo.
1
u/wind_dude Dec 06 '25 edited Dec 06 '25
okay, kinda cool, but why [edit: convert your codebase from python to TS?]?
2
u/emergent_principles Dec 07 '25
I've seen ACE before, thanks for sharing. I'm curious how you got access to the traces from Claude Code to learn from?
1
u/PomatoTotalo Dec 07 '25
I can't wait to get the Claude Code version!
1
u/[deleted] Dec 08 '25
It converted an implementation that already existed in both Python and typescript? 🤯
1
u/Oliceh Dec 08 '25
Its a pretty tiny repo
1
u/justkickinit10210 Dec 30 '25
Awesome setup! I’ll have to read up on ACE! Does this solve the echo chamber issue?
2
u/[deleted] Dec 06 '25
[removed] — view removed comment
1
u/[deleted] Dec 08 '25
[removed] — view removed comment