Agent Handoff Protocols: How to Transfer State Between Specialized Agents Without Losing Context

TL;DR: An agent handoff is the moment one AI agent passes a task, and what it knows about the task, to another. Most multi-agent failures happen at these boundaries. Pass a short, typed briefing with a decision log instead of the whole chat history, tell the receiving agent which decisions are final, and split work across agents only when one agent really can't do it.
An agent handoff is one of the places a multi-agent system breaks. When researchers at UC Berkeley and collaborators annotated runs of popular multi-agent frameworks, they sorted the causes into three groups: system design issues (44.2% of observed failures, summing the paper's per-mode shares), inter-agent misalignment (32.35%) and task verification (23.5%) (Cemri et al., "Why Do Multi-Agent LLM Systems Fail?", arXiv 2503.13657). Two of their named failure modes are pure handoff problems: loss of conversation history, which they define as unexpected context truncation, and conversation reset, an unwarranted restart of the dialogue.
This guide covers when a handoff is worth having, the structure that keeps state intact across one, and the prompts that teach agents to produce and read it. It merges two earlier Qurtoo articles on the same topic. For the basic term, see agent handoff in the glossary.
First, check you need more than one agent
A study from Google Research, Google DeepMind and MIT compared single-agent and multi-agent designs across many configurations (Kim et al., "Towards a Science of Scaling Agent Systems", arXiv 2512.08296). Results ranged from +80.8% on a financial reasoning task that splits into parallel parts to -70.0% on a sequential planning task. The paper reports that tasks where a single agent already scores above 45% accuracy "experience negative returns from additional agents", and that multi-agent setups paid a 2 to 6 times efficiency penalty, with tool-heavy tasks feeling the coordination cost most. An earlier paper found that the benefit of multi-agent systems over single agents shrinks as models improve (Gao et al., arXiv 2505.18286).
Cost points the same way. Anthropic reported that in its data, agents use about 4 times more tokens than chat, and multi-agent systems about 15 times more (Anthropic, multi-agent research system). Reliability compounds too. If each step succeeds 99% of the time, ten steps in a row succeed about 90.4% of the time (0.99 to the 10th power). At 95% per step it's about 59.9%.
So split work across agents when the task needs genuinely different tools or permissions, when the context won't fit in one window, or when independent pieces can run in parallel. If one agent with the right tools can do the job, keep one agent. Once you do split, the handoff is where the design effort goes.
The handoff schema
Instead of forwarding the whole conversation, the sending agent writes a structured object. The receiving agent reads that object and nothing else from the sender.
{
"handoff": {
"task_id": "post-0412",
"from_agent": "research-agent",
"to_agent": "writing-agent",
"task_state": {
"objective": "Write a technical post on container runtime security",
"phase": "research_complete",
"constraints": ["1500 word limit", "practitioner audience", "include code examples"]
},
"decisions_made": [
{"decision": "Focus on runtime security, not build-time", "reason": "Reader survey favored runtime topics"},
{"decision": "Use Kubernetes examples", "reason": "Most common deployment target in the audience"}
],
"artifacts": {
"research_summary": "artifacts/research-post-0412.md",
"sources": ["https://example.com/paper1", "https://example.com/paper2"]
},
"open_questions": [
"Cover eBPF-based monitoring, or stay higher level?"
],
"context_budget": {"tokens_used": 12400, "tokens_remaining": 187600}
}
}
Each field has one job. task_state says where things stand. decisions_made stops the next agent from reopening settled choices. artifacts points to outputs instead of pasting them in. open_questions flags what still needs judgment. context_budget lets the next agent plan its own token use.
The decision log is the field people skip, and it matters most. Without it, the writing agent re-researches topics the research agent already rejected, and the reviewer questions choices that were made for good reasons.
Prompting the receiving agent
The schema is the data format. The receiving agent also needs rules for reading it.
The Prompt:
You are the writing agent in a content pipeline. You receive a
handoff object from the research agent and produce a draft post.
HANDOFF RULES:
1. Read the whole handoff object before you start.
2. Treat decisions_made as final. If you disagree with one, add a note
to open_questions in your own handoff. Do not override it.
3. Use artifacts by reference. Read them, but don't copy them into
your output.
4. Resolve each open question: either decide it (and add it to your
decisions_made) or pass it on in your open_questions.
5. When you finish, write a new handoff object for the review agent.
CURRENT HANDOFF:
{handoff_json}
Why This Works: It sets decision authority. The receiving agent can flag a disagreement but can't silently undo upstream work, and it must produce a handoff of its own so the chain continues in the same format.
Expected Output: The draft post, followed by a handoff object with from_agent: writing-agent, to_agent: review-agent, the open questions it settled moved into decisions_made, and artifacts pointing at the new draft.
The structured briefing, in plain text
Not every pipeline passes JSON. When the receiving agent is driven by a system prompt, the same idea works as a briefing with fixed sections.
The Prompt:
You are the code review agent. You receive work from the
implementation agent.
## Briefing
Objective: {task_objective}
Constraints: {constraints_list}
Already done: {completed_steps}
Decisions made and why: {decision_log}
Current state and where the files are: {artifacts}
Your next step: {next_step}
Rules that apply to this task: {governance_rules}
## Instructions
Review the work against the objective and constraints. Flag any
departure from the decisions above. Do not re-decide anything in the
decision log unless you find a blocking issue. If you do, record the
evidence and return control to the coordinating agent.
Why This Works: The receiving agent gets everything it needs in a fixed order, without rebuilding context from a long transcript. The rules section travels with the task, so constraints survive every hop.
What to pass, summarize and drop
- Always pass: the receiving agent's role instructions, the current workflow state, active constraints and compliance rules.
- Pass when relevant: tool outputs from the current step, the decision log, errors and retry history.
- Summarize: older turns, long documents the previous agent read, background research.
- Drop: intermediate tool calls once you have the final result, superseded data, and the previous agent's notes on how it organized its own work.
Never drop the rules to save tokens. A pipeline that loses its constraints at a handoff passes its tests and then fails in production.
Three ways to carry context
Full history. The receiving agent sees the whole conversation under its own instructions. This is the default in OpenAI's Agents SDK, where a handoff is exposed to the model as a tool named transfer_to_<agent_name> and the new agent sees the entire previous conversation; an input_filter lets you trim it (OpenAI Agents SDK, Handoffs). It loses nothing and suits short two-agent flows, but long histories bury the receiving agent in noise.
Structured artifacts. The sender writes a file or object and the receiver reads it. Anthropic's harness for long-running coding agents uses a claude-progress.txt log plus git history: each session reads the log and recent commits first, then commits its work and updates the log before it ends (Anthropic, effective harnesses for long-running agents). It's a good default for longer pipelines.
Coordinator with targeted context. One agent manages the flow and hands each specialist only what it needs. In tests with deliberately faulty agents, a hierarchical structure lost 5.5% of its performance, against 10.5% and 23.7% for the other two structures tested (Huang et al., arXiv 2408.00989). The coordinator becomes a bottleneck, so keep its own prompt small. The supervisor-worker playbook walks through one build.
Most good pipelines mix these: artifacts for the main chain, full context at the one or two transitions where nothing can be lost, and summaries for background. To decide when an agent should hand off at all, see the three-sentence handoff prompt.
The standards underneath
MCP standardizes how an agent connects to tools and data. A2A standardizes how agents find and talk to each other, and an A2A agent publishes an Agent Card at /.well-known/agent-card.json for discovery (A2A specification). Both are now projects of the Agentic AI Foundation under the Linux Foundation (MCP announcement, A2A announcement). Your handoff schema is the content of the message. MCP and A2A are how it travels.
Start with one agent
Gartner predicts that over 40% of agentic AI projects will be canceled by the end of 2027 because of cost, unclear value or weak risk controls (Gartner, June 2025). Write one structured briefing for the whole task and give it to one agent. Split a step out only when it keeps failing because of context limits or tool access, and when you split, make the handoff explicit, typed and small. More on agent design is in the Agentic pillar.
Frequently asked questions
What is an agent handoff?
It's the transfer of control and task state from one AI agent to another, such as a research agent passing findings to a writing agent. A good handoff carries the objective, constraints, decisions already made, pointers to outputs and open questions.
How do you pass context between AI agents?
Three ways: forward the full conversation, write a structured artifact the next agent reads, or have a coordinator send each agent only what it needs. Structured artifacts with a decision log are the most reliable default for longer pipelines.
Why do multi-agent systems fail?
In Cemri et al.'s annotated runs, failures split into system design issues (44.2%), inter-agent misalignment (32.35%) and task verification (23.5%) (arXiv 2503.13657). Lost history and conversation resets at handoffs are among the named modes.
When should I use multiple agents instead of one?
When the task needs different tools or permissions at different stages, won't fit in one context window, or splits into independent parallel parts. On sequential tasks, and where one agent already does well, extra agents often make results worse (arXiv 2512.08296).
Terms in this article
From the library
- Token Budget & Cost Estimator for Production LLM AppsPlaybook
- Supervisor-Worker Agent Pattern for Cost OptimizationPlaybook
- AI Agent Security Checklist: The Lethal TrifectaPlaybook
- The Instruction Hierarchy: Training LLMs to Prioritize Privileged InstructionsPaper
- SWE-bench: Can Language Models Resolve Real-World GitHub Issues?Paper
- Chain-of-Verification Reduces Hallucination in Large Language ModelsPaper
Rather have someone set it up for you?
That's a fair call. LTFI, the agentic business operating system from Kief Studio, can set up the work these guides describe and run it with you. No website yet? Kief Studio will build you one for free.

