The Engineering Architecture Behind Claude Code Anthropic released Claude Code, a terminal-based AI agent that has captured 4% of all public GitHub commits and generates over $500 million in annual run-rate revenue. Built with TypeScript, React, Ink, and Bun, the tool leverages a concept called "product overhang" by connecting the Claude 3.6 model directly to the filesystem and developer tools, enabling autonomous codebase navigation. The tiny team achieved rapid development velocity, with 90% of the codebase written by the tool itself and an average of five production releases per engineer per day. AI https://sourcefeed.dev/c/ai Article The Engineering Architecture Behind Claude Code How Anthropic captured product overhang to build a terminal agent generating over 500 million dollars in run-rate revenue. Mariana Souza https://sourcefeed.dev/u/mariana souza It is hard to overstate how quickly the developer tooling ecosystem is shifting. What started as a clever hack to control AppleScript and change office music has turned into a massive business. Anthropic https://www.anthropic.com released Claude Code to general availability, and it has already claimed 4% of all public GitHub commits while generating more than $500 million in annual run-rate revenue. But the real story for developers is not the revenue. It is the architectural blueprint of how the tool was built, the specific decisions that allowed a tiny team to scale it, and what it reveals about the future of software engineering. Unlocking Product Overhang in the Terminal When Boris Cherny joined Anthropic in September 2024, he began experimenting with the Claude 3.6 model to understand its public API. His early prototype was a simple command-line interface CLI that could read and write files and execute bash commands. When he ran this basic agent against Anthropic's own codebase, something unexpected happened. The model began exploring the filesystem autonomously. It would read a file, identify its imports, open those imported files, and trace the execution path until it found the answer to a query. This behavior highlighted a concept Cherny calls "product overhang." The underlying model already possessed the latent capability to navigate complex codebases, but existing chat interfaces could not capture it. Chat windows isolated the model from the developer's actual environment. By moving the interface directly into the terminal, the team gave the model the hands it needed to interact with the filesystem, run compilers, and execute test suites. Within five days of releasing an internal dogfooding version in November 2024, half of Anthropic's engineering team was using the tool daily. The lesson for teams building AI tooling is clear: stop trying to build better chat wrappers. The real value lies in building tight, agentic loops that connect models directly to the tools and environments developers already use. The Stack: TypeScript, React, and Bun in the Console To build a highly interactive terminal application, the Claude Code team chose a modern, lightweight JavaScript stack: TypeScript https://www.typescriptlang.org , React https://react.dev , Ink, Yoga, and Bun https://bun.sh . Using React in a terminal application might sound counterintuitive, but the team used Ink, a library that lets you build interactive CLI apps using React's component structure. This allowed them to build a dynamic user interface in the terminal, complete with progress indicators, interactive lists, and real-time updates. Choosing Bun as the runtime provided fast startup times and unified tooling, which is critical for a CLI tool where latency directly impacts developer adoption. There is a deeper, more strategic reason for this specific stack. It is "on distribution." Because TypeScript and React are incredibly common in open-source repositories, they are heavily represented in the model's training data. This alignment meant the model was exceptionally good at writing and maintaining its own codebase. In fact, 90% of the code in Claude Code was written by the tool itself. This self-authoring capability enabled a staggering development velocity. The team averages around five production releases per engineer each day. When building a new feature, they do not spend weeks writing specifications. Instead, they prototype rapidly. For example, when designing the todo list feature, Cherny built around 20 different prototypes in a few hours over two days, iterating on how the terminal should render the list above the input prompt to keep the developer's workspace clean. The Developer Workflow: Explore, Plan, Code, Commit For developers adopting Claude Code, the tool introduces a structured workflow that differs from traditional autocomplete or chat assistants. This workflow is divided into four distinct phases: Explore, Plan, Code, and Commit. To make this workflow highly effective, the tool relies on a few key mechanisms that developers can configure and control: 1. Persistent Project Memory via CLAUDE.md Instead of relying on the model to guess project conventions, developers can place a CLAUDE.md file in the root of their repository. This file acts as a persistent memory bank, guiding the agent on how to build, test, and format code. Here is an example of a standard configuration: CLAUDE.md Build and Test Commands - Build project: bun run build - Run tests: bun test - Lint code: bun run lint Code Style Guidelines - Use TypeScript strictly; avoid the any type. - Prefer functional programming patterns and pure functions. - Write unit tests for all new helper functions using Bun's test runner. 2. Context Management One of the biggest hurdles in agentic coding is context window exhaustion. Claude Code manages this with built-in commands like /compact , /clear , and /context . Developers can explicitly prune the conversation history or load specific files into the context, ensuring the model remains fast and accurate without wasting tokens. 3. Subagents for Task Delegation To keep the main context clean, Claude Code supports subagents. If the main agent needs to perform a side task, such as searching through logs or generating a test suite, it can spin up a lightweight subagent. The subagent completes the task and returns only the relevant result, preventing the main conversation from becoming bloated with unnecessary debugging output. Lessons for Teams Building AI Tooling Anthropic's journey offers several non-obvious lessons for engineering teams building their own AI-native applications: Underfund the team, overfund the tokens: Cherny advocates for keeping engineering teams small while giving them unlimited access to model tokens. This constraints-driven approach forces developers to rely on the AI to write tests, conduct code reviews, and automate incident response, which naturally exposes bugs and usability issues in the tool. Design for generalists: The Claude Code team prioritizes generalists who can write code, design interfaces, and talk to users. On this team, product managers, data scientists, and user researchers are all expected to write code. This cross-functional capability is what allowed them to build and ship the subagents feature in just three days. Embrace Test-Driven Development TDD : Agentic workflows are breathing new life into TDD. Because models are excellent at writing code to satisfy deterministic constraints, writing tests first gives the agent a clear, automated feedback loop to verify its own work. Ultimately, Claude Code proves that the bottleneck in AI utility is no longer just model intelligence, but the design of the interface. By meeting developers where they live, in the terminal, and giving the model direct, structured access to local tools, Anthropic has shown what the next generation of software engineering looks like. Sources & further reading - The Making of Claude Code https://www.anthropic.com/features/making-of-claude-code — anthropic.com - How Claude Code is built - by Gergely Orosz https://newsletter.pragmaticengineer.com/p/how-claude-code-is-built — newsletter.pragmaticengineer.com - Head of Claude Code: What happens after coding is solved | Boris Cherny https://www.lennysnewsletter.com/p/head-of-claude-code-what-happens — lennysnewsletter.com - Boris Cherny Creator of Claude Code On How His Career Grew https://www.developing.dev/p/boris-cherny-creator-of-claude-code — developing.dev - Claude Code 101 - Anthropic Courses https://anthropic.skilljar.com/claude-code-101 — anthropic.skilljar.com Mariana Souza https://sourcefeed.dev/u/mariana souza · Senior Editor Mariana covers the fast-moving world of machine learning and generative AI, with a particular focus on how these technologies are reshaping development workflows. When she isn't stress-testing the latest foundation models, she's usually at a local hackathon. Discussion 0 No comments yet Be the first to weigh in.