Drag each answer to line up with its matching prompt
Talk loop (two agents hand off forever)
max_handoffs cap plus an allowed targets ACL that prevents the round trip
Role bleed (supervisor drifts into worker voice)
Cheaper router model plus bounded supervisor context
Deadlock (agents wait on each other in a swarm)
Hard token budget and per agent context trimming
Supervisor bottleneck (cost dominated by routing calls)
Shorter chains plus a verification step at the end
Compounding error (long chain end to end accuracy collapses)
Watchdog timer that fires a deadlock break handler on inactivity
Cost explosion (chatty team burns budget)
Structured handoff payloads instead of forwarded raw chat history
Each failure has a primary structural defence: loops want ACLs, role bleed wants typed payloads, deadlock wants a watchdog, bottleneck wants a cheap router, compounding wants shorter chains, cost wants budgets.
Imagine an office team that keeps running into trouble in different ways. Two coworkers email each other forever, never resolving anything (a loop). A manager keeps writing memos in the engineer's voice (role bleed). Two people each wait for the other to start (deadlock). The boss spends most of the budget approving every step (bottleneck). A long approval chain means errors stack up by the end (compounding error). The team meets so often that the building's electricity bill skyrockets (cost explosion). Each problem has its own real fix. You do not solve a deadlock with a cheaper boss, and you do not solve a long approval chain with a watchdog. Matching the failure to the right fix is the whole skill of running these teams.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Multi agent systems fail in a small number of distinct ways, and each failure has a primary defence whose effectiveness comes from targeting the structural cause, not the surface symptom. The matching skill is the heart of debugging and designing these systems in production.
This answer walks through the six pairings, explains the structural cause behind each failure, names the primary defence and why other defences look reasonable but fail to address the cause, and finishes with the difference between a primary structural defence and a defence in depth fallback.
Talk loops and graph constraints
A talk loop happens when two or more agents hand off in a cycle indefinitely. The classic case is agent A transfers to agent B for help, agent B's prompt is ambiguous about which agent should respond and the model decides to transfer back to agent A, and the cycle continues.
The cause is a cycle in the handoff graph
If agent B's allowed handoff targets include agent A, the back transfer is a legal move. Whether or not the model chooses it on a given turn is a prompt and context question, but the cycle exists in the graph. Production agents that look fine in testing can fall into the cycle when a confusing input flips the model's decision.
The primary defence: directed acyclic handoff graph
The OpenAI Agents SDK and similar frameworks let each agent declare its allowed handoff targets. If agent B's allowed targets do not include agent A, the back transfer tool is not in B's tool list at all. The model cannot emit it. The cycle is structurally impossible.
A max_handoffs cap is useful as defence in depth (catches accidental cycles in graphs that should have been acyclic but were misconfigured), but it is not the primary lever. Relying on the cap means the system runs the loop until the cap fires, burning tokens and time.
Situations where this technique stops working.
2–4 min · Everything important, quickly.
| Failure mode | Primary defence | Why other defences fail |
|---|---|---|
| Talk loop | Allowed targets ACL plus handoff cap | A token budget triggers only after the loop has wasted tokens |
| Role bleed | Structured handoff payloads | Prompt instructions are dominated by few shot pressure from the forwarded transcript |
| Deadlock in a swarm | Watchdog timer with break handler | Caps do not fire because the agents are not making any moves |
| Supervisor bottleneck | Cheaper router plus bounded context | Adding workers or retries makes the supervisor's job bigger, not smaller |
| Compounding error | Shorter chains plus terminal verifier | Per step prompt tuning fights an exponential with a linear lever |
| Cost explosion | Hard token budget plus per agent context trim | A budget alone clamps the symptom; trim addresses the per turn cause |
Real products, models, and research that use this idea.
- OpenAI Agents SDK ships max_handoffs and per agent allowed handoff targets as the canonical loop defence; this is the pattern this question codifies.
- LangGraph supervisor and worker templates recommend a smaller model for the supervisor node and bounded context for routing inference, matching the bottleneck defence.
What an interviewer would ask next. Try answering before peeking at the approach.
QWhat second order failure can appear when you add an allowed targets ACL?
A misconfigured ACL can prevent legitimate handoffs and produce a stuck state where the agent that knows the answer cannot be reached. Pair the ACL with eval traffic that exercises every legitimate handoff path.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Throwing a watchdog at every failure mode, or assuming a hard token budget solves the loop problem when the loop is what is burning the tokens in the first place.
60 second bullets to scan on the way to the call.
The six common multi agent failure modes and the structural cause of each
Why allowed targets ACLs make loops impossible rather than just unlikely
Primary sources. Browse if you want the original framing.
Same topic, related formats. Practice these next.