How to hand off cleanly between AIs without losing context or repeating mistakes
You have been in flow for two hours building something real, and suddenly you hit a quota wall, the thread degrades, or you need a different model. Here is how to pass the baton without the new AI breaking what already works.
The 3-step flow (no pasting entire chats)
Your files on disk
Code and long specs stay in your project folder. Never dump them into the chat window.
6-block index
Goal, real status, locked decisions, dead ends , and key files.
Verify before editing
The incoming AI states which file it will touch and which constraints it will respect before writing a line of code.
Why normal summaries fail
When you ask an outgoing AI to "summarize what we did," it writes a polite but useless chronicle: it lists intentions and drops constraints. In a real handoff, the most valuable information is not what you want to build, but what must NOT be touched and what you already tried that failed.
1. The Handoff Sheet (6 blocks, under 25 lines)
Save it as HANDOFF.md at the root of your project. That way it travels with your code and works with any model.
# Handoff Sheet — [Project Name]
## 1. Goal for this block
[What must be finished and verified before closing this session.]
## 2. Real status (done vs. remaining)
- Done & verified: [what already works]
- Remaining: [what is still missing]
## 3. Locked decisions (do not reopen)
- [e.g. Custom CSS tokens only, no heavy UI frameworks.]
- [e.g. Local JSON persistence, no external database.]
## 4. Dead ends (do NOT repeat)
- [e.g. 2s polling discarded: spiked laptop CPU usage.]
## 5. Key file map (read only these first)
- src/state/store.ts — main state
- src/ui/Panel.tsx — component to edit
## 6. Exact next step
[One concrete, verifiable action — not a vague wish.] 2. The onboarding prompt for the incoming AI
Never just say "continue." Force it to prove it understands your boundaries before editing a single file:
Read HANDOFF.md and ONLY the files listed in block 5.
Before editing anything, reply in 4 short lines:
1) What goal we are closing today.
2) Which locked decisions and dead ends you will respect.
3) Which file you will touch first and why.
4) Whether any critical detail is missing so you do not have to guess. 3. Real case: Weak sheet vs. Workshop sheet
Anonymized real scenario: you are fixing performance on a local task dashboard when your quota runs out and you switch models.
Goal: Improve the dashboard task panel.
Status: The list works, just feels a bit slow.
Decisions: Keep the dark theme.
Next step: Optimize the panel. What happens: the new AI reads half the repo burning context and suggests a setInterval loop or a library you already ruled out.
# Handoff Sheet — Local Task Panel
## 1. Goal for this block
Cut table re-renders without changing the tasks.json schema.
## 2. Real status
- Done: SSE event stream already replaced the old polling loop.
- Remaining: The entire table re-renders whenever a single row updates.
## 3. Locked decisions
- No Redux or Zustand: keep lightweight native state.
- Keep the current tasks.json schema untouched.
## 4. Dead ends (do NOT repeat)
- 2s polling: discarded due to laptop CPU spikes.
- react-window virtualization: broke keyboard selection; discarded.
## 5. Key file map
- src/hooks/useTaskStream.ts (event source)
- src/components/TaskRow.tsx (component to isolate)
## 6. Exact next step
Isolate TaskRow so it only re-renders when its own updatedAt changes, and verify in console. What happens: it opens only the 2 key files, respects your data schema, and avoids approaches that already broke keyboard navigation.
Why it works — and where it stops working
Cold memory vs. hot memory
Pasting long chat transcripts pollutes model attention and spikes token usage. HANDOFF.md acts as an executable 300–500 token index: cold memory stays on disk and the incoming AI only opens what is explicitly listed in block 5.
The weight of negative context
LLMs gravitate toward popular libraries or full rewrites. Without block 4 (Dead ends) , statistical inertia pulls the incoming model straight back to the approach that already failed in your setup.
Real validation (Dry-Run), not parroting
Asking "repeat the sheet back to me in 4 bullets" proves nothing — any model can paraphrase. The real test is making it declare which file it will touch first and which invariants it will preserve before editing.
When this method stops working
It breaks down if hidden state lives outside the repo (undocumented local env vars, unrecorded manual steps), if you cram three goals into one session, or if you forget to update the sheet before closing.
Not every environment hands off the same way
The sheet stays the same, but delivery changes depending on whether you work in web chat, a local agentic IDE, or a multi-agent orchestrator:
ChatGPT Web, Claude Web, Gemini Web
Paste HANDOFF.md in your first message and attach only the 1–2 files listed in block 5.
Watch out: Do not paste the full previous chat transcript: it crowds attention and reproduces earlier mistakes.
Antigravity, Cursor, Codex CLI, Claude Code
Keep HANDOFF.md at the project root and tell the agent to read only that sheet plus the files in block 5.
Watch out: Avoid saying "explore the whole repo to catch up": it burns tokens and quota for no reason.
Paseo, Hermes, custom hubs
Use HANDOFF.md as a shared contract on disk across sessions and providers (e.g., Gemini to Codex or Claude).
Watch out: Never rely on a single provider’s internal memory: real state and dead ends must live in the workspace.