The Handoff Problem
Every multi-agent system I've seen fail has failed at the same point: the handoff. Not the individual agents, which often work well in isolation. The moment of passing work from one agent to another.
Why Handoffs Break
Agents are designed for task completion. Handoffs require:
- A shared representation of state
- An explicit contract about what "done" means
- An error path for when the receiving agent can't proceed
Most systems have none of these by default.
The Execution Contract Pattern
Before an agent hands off to another, it should produce an execution contract: a structured object that says what was done, what's ready, and what the next agent needs to succeed.
This makes failures explicit. A receiving agent that gets a malformed contract fails loudly, not silently.
Implementation Notes
The contract doesn't need to be elaborate. A JSON object with three fields — completed, output, context — is enough to catch most handoff failures at the seam rather than three steps later.