# How to hand off work between AI coding agents

A good handoff between agents has 4 parts: a goal, the context the next agent needs, a time budget and acceptance checks that run before you see the result. brainplane calls this a checked handoff and runs it between Claude Code, Codex and Grok on your Mac.

Canonical: https://brainplane.app/guides/handoff-between-agents/

## What goes wrong in a handoff

Moving work from 1 agent to another usually means a paste: the task, a few files, maybe the last answer. The next agent misses the decisions behind the work, so it asks the same questions again or undoes a choice you already made. Then you read a result that nobody checked.

## The 4 parts of a checked handoff

| Part | What it holds |
|---|---|
| Goal | The task in 1 to 3 lines |
| Context pack | The topic's state, settled decisions, answered questions, people and files, 3,000 tokens at most |
| Budget | A time budget and a capped number of review rounds |
| Acceptance checks | What the result must pass before it reaches you |

The checks run first. A failed check sends a fix list back to the agent that did the work. A reviewer from another model family can also check the result. Both share 1 capped budget, so a handoff cannot loop forever.

## The 4 modes

| Mode | What the agent may do |
|---|---|
| review | Read only. Codex runs in its read-only sandbox, Claude Code and Grok with a read and search tool list |
| research | Read and search the web |
| write | Edit files, within the agent's own permissions |
| browser | Drive the browser, 1 agent at a time, with a queue |

## A worked example

Claude Code finished a change. You want Codex to review it before you read anything.

1. **Name the goal.** "Review the retry change in src/billing for race conditions."
2. **Pick the agent and the mode.** Codex, review. Its sandbox stays read-only.
3. **Check the pack.** `bp pack billing --for codex --role review-readonly` shows the exact brief Codex will get.
4. **Start the handoff.** `bp delegate codex --mode review --topic billing "Review the retry change in src/billing for race conditions"`
5. **Read the card.** It shows the verdict, the checks, where the result is and the command to resume the Codex session.

The same handoff starts from the command bar or from a card in the app. Nothing runs before you press Run.

## Presets

`bp delegate` has presets for common jobs: `code-review`, `second-opinion`, `legal-review`, `browser`, `x-research` and `single`. A preset sets the mode and the checks; you still write the goal.

## What a handoff never does

A handoff never sends, pays, deletes or deploys. If the work reaches 1 of those steps, the agent prepares it and brainplane shows a stop card. You press the final button yourself.

## Questions

### Which agents can receive a handoff?

Codex, Grok, Claude Code, Gemini CLI, Qwen Code, Copilot CLI, Cursor CLI, Factory Droid, Pi, OpenCode, Amp and Aider have an adapter for `bp delegate`.

### Does the next agent see my whole history?

No. It gets the context pack for 1 topic, within the vendor scopes you set. A topic with no scope goes to no agent.

### Where does the result go?

To a result file for the handoff, and to 1 finished card in your Inbox with the verdict and the checks.
