{"slug": "100cc-roll-your-own-claude-code-in-100-lines", "title": "100cc: roll your own Claude Code in 100 lines", "summary": "A developer built a functional coding agent in just 100 lines of code, bootstrapping it entirely without Claude Code. The project, called 100cc, started as a simple reimplementation of Claude's command-line interface and quickly evolved into an interactive REPL mode, with the agent rewriting itself after only three prompts. The developer noted that with a 1M context window, even proper compaction wasn't necessary to keep the agent running.", "body_md": "I had lots of fun bootstrapping a coding agent without claude.\n\nCoding agent is conceptually very simple and Claude Code is not great at observability. So why not roll your own?\n\nI 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.\n\nI’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.\n\nAnd then things got a bit wild.\n\nOf 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!\n\nAnd 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.\n\nThis 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.\n\n[https://github.com/yujqiao/100cc](https://github.com/yujqiao/100cc)\n\nPS: as all novel ideas, this is not a novel idea. I found [https://www.mihaileric.com/The-Emperor-Has-No-Clothes/](https://www.mihaileric.com/The-Emperor-Has-No-Clothes/) by searching after finishing this", "url": "https://wpnews.pro/news/100cc-roll-your-own-claude-code-in-100-lines", "canonical_source": "https://dev.to/yujqiao/100cc-roll-your-own-claude-code-in-100-lines-26dp", "published_at": "2026-06-03 01:25:05+00:00", "updated_at": "2026-06-03 01:42:07.874728+00:00", "lang": "en", "topics": ["large-language-models", "ai-agents", "ai-tools", "generative-ai", "artificial-intelligence"], "entities": ["Claude Code", "Claude", "Bun", "LLM", "yujqiao", "Mihail Eric"], "alternates": {"html": "https://wpnews.pro/news/100cc-roll-your-own-claude-code-in-100-lines", "markdown": "https://wpnews.pro/news/100cc-roll-your-own-claude-code-in-100-lines.md", "text": "https://wpnews.pro/news/100cc-roll-your-own-claude-code-in-100-lines.txt", "jsonld": "https://wpnews.pro/news/100cc-roll-your-own-claude-code-in-100-lines.jsonld"}}