I had lots of fun bootstrapping a coding agent without claude.
Coding agent is conceptually very simple and Claude Code is not great at observability. So why not roll your own?
I did it the old school way. Read the docs and write the code slowly and manually. The lines of code needed is surprisingly small to get things sky rocketed - 100 lines.
I’m not good at TUI and don’t want to learn about TUI. So my initial goal is just to play around with the API and re-implement claude -p. It was quick.
And then things got a bit wild.
Of course the next step is to have repl mode to make the program interactive. I’m never good at readline. So I just run bun start -p 'implement repl for this project' … and then I got the little > working!
And then I kept going…with the prevailing 1M context window I don’t even need a proper compaction implementation to keep it going. After three prompts to my custom little coding agent, it soon rewrote itself into this.
This is just amazing. I remember there’s a old saying that if we lost all the software in the world, we would have great trouble bootstrapping ourselves. That might not be true anymore if we magically keep the LLM running at that time. It took so little effort to bootstrap coding agent itself.
https://github.com/yujqiao/100cc
PS: as all novel ideas, this is not a novel idea. I found https://www.mihaileric.com/The-Emperor-Has-No-Clothes/ by searching after finishing this


Comments
Post a Comment