Mini Claude Code
A from-scratch implementation of an AI coding agent — harness, main loop, and context engineering.
TypeScript Node.js Anthropic API MCP
What it is
A minimal but faithful reproduction of a production AI coding agent. Built to demystify how tools like Claude Code orchestrate the LLM, the file system, and shell execution into a stable agentic loop.
Highlights
- Harness-first design — the agent is just an LLM call inside a strict loop
- Context engineering — careful management of tool results, file snapshots, and turn budgets
- Streaming UI — token-level streaming with cancellation and abort signals
Why it’s useful
If you’re building an agent and the existing frameworks feel like black boxes, read this. It’s ~1.5k lines of TypeScript, no framework, no magic.