When to reach for it
- Responsibility clearly shifts between specialists.
- User interactions must switch to the appropriate agent.
- Security boundaries apply per agent.
/pattern/handoff/
An agent completely transfers control and relevant context to another specialist.
When to reach for it
When it backfires
The tradeoff
Clear transfer of responsibility is achieved at the risk of losing vital context during the handoff.
Agent A completes its turn, packages context, and transfers control to Agent B. A single directed handoff.
The handoff carries only the last N messages. Earlier context (user preferences, constraints) is lost.
Fix · Define a structured context schema for every handoff. Include user state, constraints, and pending obligations.
The handoff condition has no history. Agents ping-pong because each thinks the other is the right owner.
Fix · Track handoff history in state. Cap total handoffs per user session and escalate to a supervisor on exhaustion.
Next pattern
Search patterns, frameworks, and pages.