Understanding Fantastic
Coding Agents

A deep technical exploration of how modern AI coding agents work — from architecture to implementation details.

Codex CLI
OpenAI · Rust · Kernel Sandbox
0
Rust Crates
0+
Tools
Claude Code
Anthropic · TypeScript · LLM Classifier
0+
Tools
0+
Modules
START EXPLORING ↓

The Agent Loop

Hover on a step to see what happens underneath

Codex CLI
User Input
TurnContext
Build Prompt
Stream API
Tool Futures
RwLock Exec
Drain
Continue?
Claude Code
User Input
Auto-Compact
System Prompt
Stream API
Streaming Exec
Batch Tools
Yield Results
Continue?

Tool Comparison

Click a cell to see implementation details

CapabilityCodex CLIClaude Code
File Search
Shell (rg)
Model runs rg via shell command
GlobTool + GrepTool
Built-in ripgrep wrappers with rich params
File Editing
apply_patch
Unified diff/patch format
FileEdit
String replacement (old→new)
Shell Execution
shell
Execute in kernel sandbox
Bash
Execute with permission checks
Web Access
Shell (curl)
Via shell commands
WebFetch + WebSearch
Dedicated tools with AI processing
Multi-Agent
spawn_agents_on_csv
In-process agents with forked history
AgentTool
Separate child processes
Code Intelligence
LSPTool
Language Server Protocol integration
Permissions
request_permissions
Model can request new permissions
Permission Dialog
Interactive approval + LLM classifier

Chapters