There's no built-in Claude Code handoff command. You continue on the same machine with claude --continue or claude --resume, pull a cloud session into your terminal with claude --teleport, or write a handoff note, by hand or with a skill, that a fresh session reads. Each of those works for one person on one account. For handing work to Codex, Cursor, a teammate's agent or one of our Grok Bots, we stopped using files at all, and the last section explains what we do instead. Docs checked 2026-10-21.
Should you hand off or compact in Claude Code?
Compact when you're staying on the same task in the same session, and hand off when you switch tasks, machines or agents. /compact replaces the conversation with a structured summary; the project-root CLAUDE.md, auto memory and the plan from plan mode are re-injected from disk, Claude Code re-reads up to five of the files it recently read or edited, and everything else said in chat is summarized (context window docs). You can steer it with /compact focus on the auth bug fix.
A handoff lets you choose what carries over. Ask for a note, run /clear, and start fresh from it. The docs recommend /clear when you switch to unrelated work, because old conversation crowds out the files you need next and costs tokens on every message. That's why "don't compact, hand off" has become the pattern for long tasks: a summary decides what to keep for you, and a handoff note doesn't.
How do I continue a Claude Code session later, or on another machine?
On the same machine, resume it. claude --continue reopens the most recent session in the current directory, claude --resume opens a picker, and /resume switches from inside a session (sessions docs). Name sessions with claude -n auth-refactor to resume them by name. A resumed session restores the full conversation, its model and usually its permission mode, but not launch flags like --add-dir.
For another machine or your phone, there are three routes:
- Cloud, then teleport.
claude --cloud "task"starts a cloud session from your GitHub remote at the current branch, so push first.claude --teleportlater pulls that session and its branch into a checkout of the same repo on any machine, same claude.ai account, no uncommitted changes (cloud docs). - Remote Control.
/remote-controlconnects claude.ai/code or the Claude mobile app to a session that keeps running on your machine, so your computer has to stay on. Pro, Max, Team or Enterprise; no API keys (Remote Control docs). - Cross-session messaging. One of your sessions can send a text message to another, but never its history or files (docs).
| Method | Who can pick it up | What carries over | What is lost |
|---|---|---|---|
--continue / --resume |
You, same machine | Full conversation, model, permission mode | Other machines and people; gone after 30 days by default |
/compact |
You, same session | A summary, plus CLAUDE.md, memory and recent files | Detail; it isn't a new session |
Cloud session plus --teleport |
You, same account, any terminal | Conversation and branch | A teammate can't teleport it |
| Remote Control | You, from phone or browser | Everything; it's the same session | Only while your machine is online |
| Handoff file or skill | Any agent or person with the repo | What the note says | Needs a push; nothing claims the next step |
What should a Claude Code handoff note include?
Enough for a reader who never saw the conversation to start in a minute: Goal in one sentence; Done, with file paths; In progress and where it stops; Decisions, each with why and what was rejected; Open questions for a person; Next step, the first concrete action; and How to check, the commands that prove the work. Leave out the transcript. A handoff is the state of one piece of work at one moment, and standing rules belong in CLAUDE.md (see Claude Code memory).
What is a good Claude Code handoff prompt?
One that names the headings and the reader, not "summarize this". Paste it before you /clear or close the terminal:
Write HANDOFF.md for an agent that has never seen this conversation.
Headings: Goal, Done, In progress, Decisions (with reasons), Open questions,
Next step, How to check. Point to files, commits and issues by path instead
of pasting them. Leave out keys and passwords. Stay under 60 lines.
Open the next session with: "Read HANDOFF.md, compare it with git status, and continue from Next step."
How do I make a Claude Code handoff skill?
Save a skill at .claude/skills/handoff/SKILL.md and it runs as /handoff (skills docs). Commit it to share it. One you can copy:
---
name: handoff
description: Write HANDOFF.md so the next session or agent can continue this work.
disable-model-invocation: true
argument-hint: "[where the next agent should start]"
---
## Repo state
!`git status --short`
!`git log --oneline -5`
## Instructions
Write HANDOFF.md at the repo root, replacing any older one, in under 60 lines.
Use these headings: Goal, Done, In progress, Decisions (with reasons and
rejected options), Open questions, Next step, How to check.
For Next step, start from this if given: $ARGUMENTS
Do not paste the conversation. Write for a reader who has never seen it.
The ! lines run before Claude reads the skill, filling in the repo state. disable-model-invocation: true means only you can trigger it; delete that line to let Claude run it when you say you're stopping. Those fields and the ! lines are Claude Code extensions to the Agent Skills standard.
The same skill in Codex: copy it to .agents/skills/handoff/SKILL.md, keep only name and description in the frontmatter, and replace the two ! lines with "Run git status --short and git log --oneline -5 first." Codex scans .agents/skills from your working directory up to the repo root (Codex docs); run it with $handoff. Both tools then write the same HANDOFF.md, so either can pick up the other's work. Cursor reads AGENTS.md, so a line there, "If HANDOFF.md exists, read it first," covers it too; why Cursor and Claude Code can't share context is the longer story.
Is a handoff skill enough on its own?
For one person on one repo, yes. It falls short in three ways: the note reaches only agents that can read the repo, and only after a push; each handoff overwrites the last, so the history lives only in git; and nothing stops two agents from reading the same Next step and both starting it. The teammate case has its own guide: Claude Code for teams.
How we hand off: a workspace, not a file
We don't keep a HANDOFF.md anywhere, and we didn't write the skill above for ourselves. Every agent we run is connected to the same Tokenrip workspace, and the handoff is what the workspace already holds: the pinned decisions, the open tasks, and the note the last agent left when it stopped. The clearest version of it isn't even Claude-to-Claude. A Grok Bot doing its rounds finds an issue, files a task in the workspace with what it found, and one of our Claude Codes picks it up on its next load, works it under a lease so no other agent takes the same one, and records the result where the bot can see it. The same loop runs between the two of us: one person's Claude Code leaves the note, the other's reads it the next morning along with everything that changed in between. Nothing gets pushed, nothing gets pasted, and the history of every handoff is there instead of being overwritten.
If you already have a /handoff skill, pointing it at a workspace is one line: "Save this note as a handoff in the project's Tokenrip workspace, and file the Next step as a task." Tokenrip doesn't read your transcript; the agent writes the note when a skill or pinned instruction tells it to. To connect an agent, paste this into it; you give an email address and a six-digit code, and the first connected agent can hand the next one a code so there's no second email.
Connect me to Tokenrip. Fetch https://tokenrip.com/setup?ref=claude-code-handoff and follow it.