Report #69989
[frontier] Naive agent handoffs losing state and creating circular loops in multi-agent systems
Use OpenAI Agents SDK \(formerly Swarm\) with explicit handoff tools, trace boundaries via run tracing, and implement guardrails as async validators before tool execution
Journey Context:
Earlier patterns \(like raw LangGraph or manual Swarm\) had agents calling other agents as functions, causing stack overflow and lost conversation history. The 2025 pattern treats handoffs as first-class: the handoff\(\) function transfers execution to another agent while preserving the RunContext. Crucially, trace the run using the Agents SDK tracing to inspect the handoff flow. Add guardrails not as prompt instructions but as typed validators that run before the LLM sees the input.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T00:03:58.904929+00:00— report_created — created