Orchestration
How work moves: lifecycle hooks, retries, approval gates, heartbeats, human handoff. The layer where agent work looks less like chat and more like a runtime.
Orchestration is the harness deciding how work moves. Lifecycle hooks, heartbeats, retries, approval gates, human handoff, wrapping tool calls, ordering steps, routing between models — the busy machinery that carries a workflow from start to finish.
Less like chat, more like a runtime
Every rule of the form "before X, do this; after Y, do that" lives here:
- Before a tool call — validate it, rewrite it, or block it outright
- After a failure — retry with backoff, replan, or escalate
- Before the risky step — stop and ask the human
- On a schedule — heartbeats that keep long work alive and detect stalls
This is the layer where agent work stops looking like a conversation and starts looking like a runtime. The model is not doing any of this by willpower — the harness is carrying the workflow, and the model gets to spend its attention on reasoning.
Claude Code hooks are a textbook example: user-defined commands that fire on lifecycle events like pre-tool-use and post-tool-use, able to block, allow, or annotate the action. Agent frameworks expose the same idea as lifecycle events and middleware. Approval gates — "this command needs your yes" — are orchestration too, as is the heartbeat pattern popularized by projects like OpenClaw.
One agent, one attention stream
Orchestration lets a single agent do far more — but that agent still has one attention stream. Mid-task, you often want someone to go research a library, explore a repository, review a diff, verify a browser rendered correctly. If one agent does all of that serially, two things go wrong:
- It's slow — everything happens one after another
- The context gets crowded — every side quest dumps its findings into the same window that's trying to hold the main task
When work branches, the harness needs to branch too.