You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Instantly share code, notes, and snippets.
🕶️
Being a cool guy
Haseeb Qureshi
Haseeb-Qureshi
🕶️
Being a cool guy
Managing partner at Dragonfly.
Previously @airbnb, @earndotcom, Metastable.
Anthropic's Claude Code CLI source code leaked onto GitHub recently. All of it. About 1,900 files and a lot of TypeScript.
I read through the key modules. What follows is a breakdown of the surprising parts: how the system actually works, where Anthropic made clever engineering choices, and where their approach diverges from OpenAI's Codex in ways you wouldn't guess from using either tool.
Lifecycle of a request
Here's what happens when you type a message into Claude Code:
AI Coding Agent Architecture Analysis: Claude Code vs Codex vs Cline vs OpenCode
I Read the Source Code of Four AI Coding Agents. The Real Product Isn't the AI.
I expected the differences between AI coding agents to be in how they call the LLM. They're not. The API call is trivial -- a streaming HTTP request with a JSON payload. Every agent does it essentially the same way.
What makes these tools different -- what makes them products -- is everything wrapped around that API call: the 40 tools that give the AI hands, the permission systems that keep it from breaking things, the compaction strategies that prevent it from forgetting what it's doing, and the prompt engineering that shapes how it thinks.
I cloned the source code for all four major AI coding agents -- Claude Code (from a leaked copy of Anthropic's proprietary source), OpenAI's Codex CLI, Cline (the popular VS Code extension), and OpenCode (an open-source Go CLI) -- and read through their internals. What I found reveals four competing philosophies about a fundamental question: **how much should you trust an AI with your c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters