{"slug": "how-to-hand-off-a-task-between-claude-code-codex-and-cursor", "title": "How to hand off a task between Claude Code, Codex and Cursor", "summary": "Claude Code, Codex CLI and Cursor each store sessions in separate locations — Claude Code in ~/.claude/projects/, Codex CLI in ~/.codex/sessions/, and Cursor inside its per-workspace Agent panel — so no agent can read another's session, and a task can only move between them via a written handoff note. The guide recommends asking the outgoing agent to write a HANDOFF.md covering the goal, what is done, what is next, decisions made and open items, then starting the next agent with \"read HANDOFF.md and carry on from Next\", while keeping standing rules in AGENTS.md, which Codex and Cursor read directly and Claude Code reads through a one-line @AGENTS.md import in CLAUDE.md. It also lists three open-source handoff tools as of 12 November 2026 — TStansel/handoff, OpenMOSS/claude-codex-handoff and crossby — and notes Codex's /import command copies a Claude Code or Cursor setup once but not the task in flight.", "body_md": "Blog\n\n# How to hand off a task between Claude Code, Codex and Cursor\n\nPublished: November 13, 2026\n\nTo hand a task from Claude Code to Codex or Cursor, ask the agent you are leaving to write a short handoff note (the goal, what is done, what is next, what was decided), then start the next agent with “read the handoff and carry on”. No agent reads another's session, so the note is the bridge. Keep standing rules in `AGENTS.md`, where all three read them.\n\n## Why the next agent starts from nothing\n\nEach agent keeps its sessions in its own place, in its own format, and none of them reads the others'. Resuming works only inside the same tool.\n\n| Agent | Where its sessions live | How you resume, in that agent only | \n|---|---|---|\n| Claude Code | `~/.claude/projects/` , one folder per project | `claude --continue` or`claude --resume` | \n| Codex CLI | `~/.codex/sessions/` | `codex resume` | \n| Cursor | Inside Cursor, per workspace | The chat history in the Agent panel | \n\nWhat does cross over is what is in the repo. Codex and Cursor read `AGENTS.md`, and Claude Code reads it through a one-line `@AGENTS.md` import in `CLAUDE.md` (see [AGENTS.md vs CLAUDE.md](https://gethrbr.com/blog/agents-md-vs-claude-md)). That carries your rules. It does not carry the task you were halfway through.\n\n## The free way: a HANDOFF.md\n\nBefore you switch, tell the agent: “Write HANDOFF.md for the next agent: the goal, what is done, what is next, what we decided and why, and anything open.” Read it before you leave. The agent wrote it from memory, and that is where it goes wrong.\n\n```\n# Handoff\n\nGoal: what the task is for, in one sentence.\nDone: what works now, with the files touched.\nNext: the very next step.\nDecided: choices made, and the ones rejected with why.\nOpen: questions, failing tests, anything half done.\nGit: branch, last commit, and whether it is pushed.\n```\n\nThen open the other agent in the same folder and say “read HANDOFF.md and carry on from Next”. Three habits make it hold:\n\n- **Let git carry the code.** Commit or at least stage before you switch. A note that says “done” next to a diff that says otherwise sends the next agent the wrong way.\n- **Write down what you rejected.** The next agent will otherwise try the approach you already ruled out.\n- **Keep it out of the rules.** A handoff is about one task and goes stale in a day. Add`HANDOFF.md` to`.gitignore` , and move anything that should hold for every task into`AGENTS.md` .\n\n## Should I compact or hand off?\n\nCompacting keeps you in the same agent and the same session: it shrinks the conversation so you can keep going. A handoff is for when you leave the session, to another agent, a fresh session, or a teammate. If you are switching tools anyway, write the note first. A summary written while the agent still has the whole session in view is better than one written after compaction.\n\n## Handing the task to a teammate\n\nThe same note works, with one more step: push. A teammate cannot see files you have not committed or commits you have not pushed, so put the branch name in the note and push it, even as a work-in-progress commit. Pasting the note into the pull request description keeps it next to the code.\n\n## Tools that do the handoff for you\n\nA few open-source tools read one agent's session and write the note or the prompt for the next. As their own listings describe them, on 12 November 2026:\n\n| Tool | What it says it does | \n|---|---|\n| [TStansel/handoff](https://github.com/TStansel/handoff) | Hands context from one agent to another, from the command line | \n| [OpenMOSS/claude-codex-handoff](https://github.com/OpenMOSS/claude-codex-handoff) | A file-based handoff protocol for Claude Code and Codex working in one project | \n| [crossby](https://pypi.org/project/crossby/) | A bridge across AI agents, including a handoff between them | \n\nCodex also has `/import`, which copies a Claude Code or Cursor setup across once (instructions and project memories). It moves your setup, not the task in flight (see [Codex memories](https://gethrbr.com/blog/codex-memories)).\n\n## With Harbor: say handoff, then handoff pick\n\nHarbor has handoffs built in for Claude Code, Codex, Cursor and GitHub Copilot. Type `handoff` where you stop. The agent writes the note in its reply, so you see it, and Harbor reads the branch, the commit, the uncommitted files and the commits not pushed from git itself. Open any agent in the same repo and type `handoff pick`, and it carries on from the next step. A handoff belongs to the repo, not the branch.\n\n- **Forgot to save one?**`continue from claude` (or`codex` ,`cursor` ,`copilot` ) picks up that agent's last session in this repo on the same machine.\n- **To a teammate:**`handoff @dana` . Their agent fetches your branch, and asks first if they have uncommitted changes. If you have work they cannot see yet, the agent offers to push it.\n- **How long:** yours waits 72 hours, a teammate's 7 days, and every handoff is deleted after 90 days.\n\nThe full list of words is in the [Handoffs docs](https://gethrbr.com/docs/handoffs). Harbor is [shared memory for AI coding agents](https://gethrbr.com/coding-agents), and handoffs run on the hooks it already installs.\n\n## Questions\n\n### How do I hand off a task from Claude Code to Codex?\n\nAsk Claude Code to write a short handoff note (the goal, what is done, what is next, what was decided and why), commit or stage your work, then open Codex in the same folder and tell it to read the note and carry on. Codex does not read Claude Code sessions, so the note is what crosses over.\n\n### Can Codex or Cursor read a Claude Code session?\n\nNo. Claude Code keeps sessions under ~/.claude/projects/ and resumes them with claude --continue or --resume; Codex keeps its own under ~/.codex/sessions/ and resumes with codex resume. Neither reads the other. Codex /import copies a Claude Code setup across once, not the task in progress.\n\n### What should a HANDOFF.md contain?\n\nThe goal in one sentence, what is done with the files touched, the very next step, the choices made and the ones rejected with why, open questions or failing tests, and the branch and last commit. Read it before you switch, and keep it out of git.\n\n### Should I use /compact or a handoff?\n\nCompact to keep going in the same session. Hand off when you leave it, for another agent, a fresh session or a teammate, and write the note before compacting, while the agent still has the whole session in view.\n\n### Is there a tool that does the handoff automatically?\n\nOpen-source options include TStansel/handoff, OpenMOSS/claude-codex-handoff and crossby. Harbor has it built in for Claude Code, Codex, Cursor and GitHub Copilot: type handoff where you stop and handoff pick in the next agent, or handoff @name to give the task to a teammate.", "url": "https://wpnews.pro/news/how-to-hand-off-a-task-between-claude-code-codex-and-cursor", "canonical_source": "https://gethrbr.com/blog/hand-off-claude-code-to-codex", "published_at": "2026-11-12 22:23:09.726968+00:00", "updated_at": "2026-11-12 22:23:11.860480+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools"], "entities": ["Claude Code", "Codex CLI", "Cursor", "TStansel/handoff", "OpenMOSS/claude-codex-handoff", "crossby"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/how-to-hand-off-a-task-between-claude-code-codex-and-cursor", "markdown": "https://wpnews.pro/news/how-to-hand-off-a-task-between-claude-code-codex-and-cursor.md", "text": "https://wpnews.pro/news/how-to-hand-off-a-task-between-claude-code-codex-and-cursor.txt", "jsonld": "https://wpnews.pro/news/how-to-hand-off-a-task-between-claude-code-codex-and-cursor.jsonld"}}