Inside the Agent. Under the Hood of Claude Code, Codex, a...
summary
Compares three open and closed harnesses and shows concrete internals: Claude Code keeps a 20,000-token buffer and uses micro‑compaction and repetition folding, Codex enforces a 10,000-token ceiling and append‑only history, Cloud Code was reverse‑engineered after a March source‑map leak. Describes real tools used—file_edit, grep, apply_patch (apply patch), SQLite + vector search, Tree‑sitter/LSP sandboxes—explains KV prompt caching, constrained sampling, session memory and sub‑agents, and gives practical tradeoffs in cost, latency and when compaction fails.
AI-written summary · about
chapters (15)
- 0:00Introduction to agents
- 1:07Modern LLM-powered agents
- 2:10Open Code and Cloud Code overview
- 4:16Reverse engineering Cloud Code
- 4:38Codex from OpenAI
- 5:19Context compaction and prompt caching
- 7:07Claude Code's context structure
- 9:14Codex context handling
- 10:38Constrained sampling in LLMs
- 12:02Static tools in Cloud Code
- 13:48Session memory in harnesses
- 14:51Skills and language servers
- 16:40Sub-agents and approvals
- 18:05Security and isolation methods
- 19:06Conclusion and Q&A
