1 link tagged with all of: source-code + engineering + anthropic + claude-code
Click any tag below to further narrow down your results
Links
The article breaks down the recently leaked source code of Anthropic's Claude Code CLI. It highlights the system's architecture, design choices, and differences from OpenAI's Codex, particularly in handling context overflow and user interactions. Key features like compaction strategies and internal versus external user instructions are explored.
- Claude Code uses a four-tiered compaction strategy (proactive token monitoring, reactive fallback, and a "snip compaction" mode for headless sessions) versus Codex's simpler diff-based approach that just minimizes data sent per turn
- The system prompt uses a boundary marker to cache roughly 3,000 tokens of static instructions across users for performance gains
- Internal users get specialized instructions specifically designed to stop the model from misrepresenting test results or giving misleading status updates
- The codebase includes feature flags and build-time checks specifically to prevent sensitive information from leaking into public builds