Report #77456
[frontier] Multi-agent handoffs carry full conversation history, causing context window overflow and agents confusing their role with previous agents' identities
Implement handoffs in OpenAI Agents SDK with explicit context pruning: use \`handoff\` with custom \`input\` filtering to pass only the last user message \+ summarized intent, strip previous agent tool outputs, and reset the agent context to prevent role confusion
Journey Context:
Naive handoffs dump the entire message list into the next agent, who then sees internal tool calls from the previous agent \(confusing\) and hits token limits quickly, causing later agents to lose critical early instructions. Context pruning treats handoffs as RPC boundaries, not stateful continuations. By filtering inputs to only relevant intent and parameters, receiving agents maintain clean context boundaries and clear role identities. This enables 'specialist' agents that only see their specific domain inputs rather than the entire conversation archaeology, preventing the 'identity confusion' where a billing agent starts acting like a support agent because it saw the previous agent's tool calls.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T12:36:31.668117+00:00— report_created — created