Claude Code's source code just got leaked, so I used Claude Code to study its own source code and compare it against Codex.
Interesting finds:
1. Claude Code has multiple silent mini-compaction events before global compaction kicks in. It silently compacts previous turns and tool calls to manage context size, to extend runway before you get stop-the-world compaction. This is a lot of the secret sauce of why long sessions feel so good.
2. Anthropic has special custom prompting changes that only activate for Anthropic employees. This includes: "Never claim 'all tests pass' when output shows failures." and "Keep text between tool calls to <=25 words." Worth adding these to your global claude.md, as they almost certainly have a ton of data that these improve performance.
3. Claude Code precomputes responses while the user is typing, to make response times feel magical and snappier. For simple responses like "yes," the harness starts processing your likely result before you ever hit enter.
4. Claude Code's interface is actually written in React, but then rendered to the terminal. Not typical for TUIs. Big part of why the memory footprint is so high?
8004 is half-baked. It's just a registry. Anyone can add to it slop slop slop
Discoverability without trust is just noise.
Hard problem ahead - how to calculate trust. Huge opportunity for someone to solve! Imagine searching this mess and then seeing an agent with a reputation score of 98 provided by someone or provider you trust, ie XYZ Protocol.