The Multi-Agent Handoff Interview: When to Hand Off, When to Hold
When an interviewer asks how you’d split work across agents — or when one agent should hand off to another — they are testing whether you price the handoff. Passing work to a specialist is not free: the context transfer costs tokens and latency every time you switch. Candidates arrive with one of two reflexes — one agent does everything, or a specialist for every step — and both are wrong.
Concrete, verifiable example. In the puzzle below, 7 subtasks flow through 3 agents; each agent has a cost per subtask (cheap at its specialty), and every handoff between consecutive subtasks costs 9. The cheapest plan costs 53, using 2 handoffs. Never handing off — the best single agent doing everything — costs 65. Handing off to the specialist at every boundary costs 65. The two extremes land on the same bill — 23% over the optimum (82% of optimal).
That symmetry is the interview. A handoff is a purchase: you pay the switch cost to buy the specialist’s saving on the subtasks ahead — so you hand off exactly where the saving beats the toll, and hold everywhere else. This guide gives you the model, and a free interactive that scores your plan against the exact optimum (a dynamic program over subtask × agent).
Why this question shows up in AI-engineering interviews
Multi-agent design is the newest layer of the agent interview, and the handoff question wears several disguises:
- “When should one agent hand off to another?”
- “Design a multi-agent system for this workflow — who does what?”
- “One big generalist agent or a team of specialists?”
- “Our multi-agent pipeline is slow and expensive — why?”
Every one is the same underlying problem: a sequence of subtasks, a per-subtask cost for each agent, and a toll on every switch — minimise the total. Interviewers ask it because the failure is real: teams split an agent into specialists, then watch the context re-serialisation between them eat the savings. The plan is a min-cost path through (subtask × agent), and the handoff toll is what makes it a decision instead of a lookup.
The mental model that gets you to optimal
Treat every handoff as a purchase, then check whether the purchase pays. Four ideas get you to the cheapest plan:
- A handoff is a purchase. Switching costs 9 here; it is worth it only when the specialist saves more than 9 on the stretch you’re buying. Count the saving over every consecutive subtask the new agent will hold, not just the next one.
- Batch work into runs. Because only boundaries cost, the optimal plan holds each agent through a contiguous run of subtasks. Fragmented plans pay the toll over and over for savings they could have had in one purchase.
- Hold through a cheap detour. If a different specialist is cheaper for just one subtask mid-run, switching there-and-back costs 18 (two handoffs). In the puzzle the optimal plan pays 8 at subtask 3 instead of the specialist’s 2, because the round trip costs more than it saves.
- It’s a path, not per-task picks. Each subtask’s best agent depends on who held the previous one — which is why the exact answer is a dynamic program over (subtask, agent), and why per-task instincts mislead.
Put together: give each agent a contiguous run, place the boundaries only where the specialist’s saving beats the switch cost, and tolerate a mid-run subtask done by a non-specialist when the round trip doesn’t pay. That is the plan the puzzle scores you against.
The two traps that fail the same way
| Policy | Work paid | Handoffs paid | Total |
|---|---|---|---|
| Never hand off (best single agent) | 65 | 0 | 65 |
| Specialist for every subtask | 29 | 4 × 9 = 36 | 65 |
| Optimal (hand off where it pays) | 35 | 2 × 9 = 18 | 53 |
The table is the whole lesson. Never switching pays the generalist rate on every subtask outside its specialty. Always switching gets the cheapest work (29) and then hands the entire saving back in 4 switch tolls. The optimal plan sits between them at 53 — and interviewers probe exactly this: can you name the handoff cost as the thing both extremes ignore?
The puzzle simplifies on purpose: the handoff is a flat, known cost, per-subtask costs are given, and every agent produces identical quality. In production the handoff price is a context transfer you estimate — tokens re-serialised, latency, information lost in the summary — and specialists differ on quality, not just cost. What survives intact is the decision structure: price the transfer, buy it only where the saving beats it.
Practice it: place the handoffs against the optimum
Describing the tradeoff is not the same as placing the boundaries under real numbers. Below is the live Multi-Agent Handoff puzzle from The Arena. It starts with one agent doing everything; assign each subtask, and The Arena computes the cheapest plan by dynamic programming and scores yours as a percentage of it. No login required.
What “good” looks like
When you can place handoffs only where they pay, you can defend a multi-agent design on cost instead of vibes — and explain why the 2-handoff plan at 53 beats both the 65 extremes. Naming the deliberate hold — paying 8 instead of 2 to skip a 18-point round trip — is the senior answer.
Frequently asked
How do you design a multi-agent handoff in an interview?
Model it as a min-cost path: each subtask has a per-agent cost and every switch between agents costs a handoff fee, so you hand off only where the specialist’s saving over its run beats the fee. In the worked example the optimal 2-handoff plan costs 53, while never switching and always switching both cost 65.
When should one AI agent hand off to another?
When the specialist’s saving on the contiguous stretch it will own exceeds the cost of transferring context to it. If the saving is smaller than the transfer — or the specialist would hold only one cheap subtask before handing back — keep the current agent and eat the slightly worse per-task cost.
Is one big agent better than a team of specialist agents?
Neither is a default. One agent avoids all handoff costs but pays generalist rates everywhere; a specialist per step gets the cheapest work and gives the saving back in transfer costs. The right split batches subtasks into runs and places boundaries only where they pay — it is arithmetic, not philosophy.
Why is my multi-agent system slower and more expensive than one agent?
Usually because it hands off too often. Every handoff re-serialises context — tokens, latency, and often lost detail — and a pipeline that switches agents at every step pays that toll constantly. Batch consecutive work inside one agent and keep only the handoffs whose specialist savings beat the transfer cost.
New scored, provably-optimal interview drills, now and then — no spam, unsubscribe anytime.
More interview guides
41 puzzles — RAG tuning, tool routing, agent orchestration, prompt/KV caching, memory compaction — each scored against a provably optimal answer.
Explore the puzzles →