02
LAYER 02 / 06

Orchestration

The orchestration layer is the agent loop — the heart of Claude Code. It receives your prompt, decides which tools to call, executes them (sometimes in parallel), and loops until the task is done. It also manages auto-compaction when conversations get too long.

AT A GLANCE
~85
Slash Commands
[ DETAILS ]
80+
React Hooks
[ DETAILS ]
200k
Compaction Trigger
[ DETAILS ]
6
Task Types
[ DETAILS ]

The Agent Loop

💬User Input
🧠Claude Thinks
🔧Tool Call
📋Result Back
More Tools?
↩ loop

Parallel vs Sequential

Each tool waits for the previous one
Read config.ts
200ms
Edit config.ts
400ms
Bash: npm test
600ms
Total: ~600ms

Auto-Compaction

0200k tokens1M
threshold
0k tokens