To hand off work from Claude Code, end each block by writing a handoff note (what's done, what's in progress, the next three steps, the decisions) somewhere every agent can read, and start the next session by reading it. claude --resume brings back a conversation on the same machine, but Codex and Cursor never see Claude Code's transcripts or auto memory. A shared note does.
I run LotsTech's agents this way: a different agent may pick up tomorrow's work, sometimes Claude Code, sometimes Codex, sometimes a cloud agent, and the rule is that everything needed to continue lives in notes, never only in a chat or on one computer. Below is what Claude Code, Codex and Cursor each carry over between sessions today, from their own docs checked on 22 October 2026, and the handoff note pattern I use with LotsNotes over MCP.
What carries over, and what doesn't
Checked on 22 October 2026 in the Claude Code docs, the Codex docs and the Cursor docs.
| Claude Code | Codex CLI | Cursor | |
|---|---|---|---|
| Resume a past session | claude --continue (latest in this directory) or claude --resume <name or ID> | codex resume (--last for the latest in this directory) | @Chats brings context from a previous Cursor conversation into a new one |
| Where sessions live | JSONL transcripts in ~/.claude/projects/<project>/, kept 30 days by default | Saved sessions on your machine, listed by codex resume | Chats in Cursor; Agent checkpoints are stored locally |
| Branch a session | /branch or --fork-session | codex fork or /fork | Side chats (/side) |
| When context fills | Auto-compaction; /compact [focus] by hand | /compact | Older turns are compressed into a summary |
| Instruction file | CLAUDE.md, or AGENTS.md when there's no CLAUDE.md | AGENTS.md (global, then root down to your folder) | .cursor/rules/*.mdc and AGENTS.md (root and nested) |
| Its own memory | Auto memory, machine-local | Local memory store | Rules; no memory between completions without them |
| Import from another agent | /import codex, gemini or cursor: instruction files, MCP servers, commands, subagents, skills | /import from Claude Code or Cursor: setup, project files, up to 50 chats from the last 30 days | Migration guides for VS Code and JetBrains; none for Claude Code or Codex in its docs index |
| Reads the other tools' sessions live | No | No | No |
The last row is why handoffs break. Each tool is good at continuing its own work on the machine where it ran. None of them reads what the other two are doing right now.
Passing work between Claude Code sessions
Inside Claude Code, the conversation itself is the handoff, as long as you stay on one machine.
- Name sessions you'll come back to.
claude -n "billing-refactor"names a session at start, and/renamenames it later. Thenclaude --resume billing-refactoropens it directly, and the/resumepicker shows the name. claude --continueopens the most recent session in the current directory.- Branch before a risky turn.
/branch try-other-approachcopies the conversation so far and switches you into the copy, leaving the original intact. From the shell,claude --continue --fork-sessiondoes the same. - Compact with a focus.
/compact keep the migration plan and failing testssummarizes the conversation with your focus instructions, so the parts the next turn needs survive. - Export for a person.
/export handoff.txtwrites the conversation as readable text. - PR-linked sessions. When Claude Code opens a pull request,
claude --from-pr 123finds the sessions linked to it.
Two limits make this a same-machine handoff. Transcripts are stored locally and cleaned up after 30 days by default (cleanupPeriodDays changes that). And Anthropic's memory docs say auto memory is machine-local: it isn't shared across machines or cloud environments. One more detail from the sessions page: a resumed session doesn't restore flags such as --mcp-config, --settings or --add-dir, so pass them again.
claude --teleport resumes a Claude Code cloud session in your local terminal, which covers the cloud-to-laptop case inside Claude Code. It doesn't help Codex or Cursor.
Claude Code to Codex
Codex reads AGENTS.md before it does any work: ~/.codex/AGENTS.md first, then each directory from the project root down to where you started, with closer files winning, up to 32 KiB by default. Claude Code reads AGENTS.md too when there's no CLAUDE.md (Claude Code v2.1.277 or later), or through an @AGENTS.md import inside CLAUDE.md. So one committed AGENTS.md gives both tools the same rules.
For moving the work itself, Codex has /import. From a local Codex CLI session, choose Claude Code, then select the setup, project files and recent chats to bring over. OpenAI's import page lists what maps where: instruction files to AGENTS.md, Claude Code project memories to Codex memories, MCP server configuration, hooks, slash commands (as skills), subagents, and chats from the last 30 days, up to 50 in the CLI. Importing leaves your Claude Code setup unchanged.
That's a migration, not a handoff. It copies what existed at that moment, from that machine, one way. If you go back to Claude Code tomorrow, nothing Codex learned comes with you. OpenAI's own memories page says the same about memory: keep required guidance in AGENTS.md or checked-in docs, and treat memories as a helpful recall layer, not as the only source for rules.
Claude Code to Cursor
Cursor reads AGENTS.md in the project root and in subdirectories, alongside its own .cursor/rules files (which must be .mdc files with frontmatter; plain .md files there are ignored). Cursor's rules page puts it plainly: models don't retain memory between completions, and rules provide the persistent context.
Conversation history stays inside each tool. In Cursor, @Chats references a previous Cursor conversation, not a Claude Code one. Going the other way, Claude Code's /import cursor brings Cursor's instruction files, MCP servers, commands, subagents and skills into Claude Code, not its chats.
Cloud agents add one more gap. Cursor's cloud agents run in their own VMs and, per Cursor's docs, can't read files from your local home directory. Anything that lives only in ~/.claude or ~/.cursor on your laptop isn't there.
The handoff note pattern
What the next agent needs isn't the whole transcript. It's the current state of the work, in a form any agent can read in a few seconds. I keep one note per agent or project called handoff, rewritten at the end of every working block:
# Handoff: billing-refactor Updated: 2026-10-22 18:40 IST by Claude Code ## State Branch `billing-refactor`, PR #123 open, CI green except `invoice.test.ts`. ## Done this block - Moved tax rounding into `lib/tax.ts`; old helper deleted. - Migration 041 written, not applied. ## In progress - `invoice.test.ts`: two snapshots fail after the rounding change. Expected, need regenerating. ## Next 3 steps 1. Regenerate the two snapshots and check the totals by hand. 2. Apply migration 041 on staging. 3. Ask the founder before touching the refund flow. ## Decisions - Round per line, not per invoice (founder, 2026-10-22). ## Don't touch - `lib/payments/`: owned by another session today.
Rules that live for months (stack, conventions, "never touch production") go in AGENTS.md. The handoff note changes every block, so it doesn't belong in a committed file.
Where to keep it so every agent reads it
The note has to be somewhere Claude Code, Codex, Cursor and cloud agents can all reach. I keep it in LotsNotes: a workspace for the business, a folder per project or agent, and in each folder an AGENTS.md, a handoff and a ledger note. Every agent reads the same note over MCP, and the cloud ones over the REST API. It works with the AI agent you already use, and you can read and edit the same note on lotsnotes.com.
Connect each tool once (full steps on lotsnotes.com/mcp):
- Claude Code:
claude mcp add --transport http lots-notes https://api.lotsnotes.com/mcp, then/mcpand choose Authenticate. - Codex:
codex mcp add lots-notes --url https://api.lotsnotes.com/mcp, thencodex mcp login lots-notes. - Cursor: add
"lots-notes": { "url": "https://api.lotsnotes.com/mcp" }undermcpServersin~/.cursor/mcp.json(every project) or.cursor/mcp.json(one project). Cursor opens the sign-in on first connect.
The tools, start to finish
Every tool below is in the LotsNotes tool list.
Start of a session:
list_workspaces, thenlist_foldersto find the project's folder.find_contextwithworkspace_idandfolder_id. Workspace notes come back every time, plus that folder's own notes, each with a one-line summary.read_noteonAGENTS.mdfirst, thenhandoff.read_notereturns the note'scurrent_version; the agent keeps it.
End of a block:
save_context_noteonhandoffwith the new body andexpected_versionset to the version it read. If another agent changed the note in the meantime, the save fails with a conflict instead of overwriting it; the agent reads it again and merges.create_context_notefor a new note, such as a decision record, with a one-linesummaryso the next agent can pick it from search results.
When a handoff goes wrong:
list_context_versionsandrestore_context_versionbring back any earlier version of the note. Restoring keeps the current state in history too.
Every note the agent reads or saves comes back with its lotsnotes.com link, so it can hand you the link to check what it wrote.
The prompts I use
End of a Claude Code session:
Before we stop: rewrite the
handoffnote in the billing-refactor folder in LotsNotes. Include state, done this block, in progress, next 3 steps, decisions and don't-touch. Save it with the expected_version you read, then give me the link.
Start of the next session, in Codex, Cursor or Claude Code:
Read AGENTS.md and the handoff note in the billing-refactor folder in LotsNotes, tell me in three lines where things stand, then start on step 1.
To make it automatic, put two lines in the repository's AGENTS.md, which Claude Code, Codex and Cursor all read: "At the start of a session, read the handoff note in LotsNotes folder billing-refactor. Before you stop, rewrite it."
Keep secrets out of the handoff
A handoff note is shared context, so every agent you connect reads it. Never put API keys, tokens or passwords in it. Notes you want next to the work but out of every agent's reach can be private notes in LotsNotes: they stay on lotsnotes.com and are never returned over MCP or the API. More on that in Is LotsNotes Safe?.
If you're still deciding where each kind of instruction belongs, I compared them in AGENTS.md vs CLAUDE.md and Claude Skills vs Projects vs MCP vs CLAUDE.md.
LotsNotes is free for one person (1 workspace, 3 folders, unlimited notes, MCP and REST), and Pro is $99 once for unlimited workspaces, folders and teammates.
FAQ
How do I continue a Claude Code session later?
Run claude --continue in the same directory for the most recent session, or claude --resume <name> for a named one. Name a session with claude -n or /rename. Transcripts are stored on your machine in ~/.claude/projects/ and kept for 30 days by default.
Can Codex continue a Claude Code session?
Not live. Codex's /import copies Claude Code setup, project files, project memories and up to 50 chats from the last 30 days into Codex, once, on that machine. To keep working back and forth, both should read the same AGENTS.md and the same handoff note.
Does Cursor read CLAUDE.md or Claude Code's memory?
Cursor's rules docs cover .cursor/rules, User Rules, Team Rules and AGENTS.md, not CLAUDE.md. Claude Code's auto memory is machine-local in ~/.claude/projects/<project>/memory/. Put shared rules in AGENTS.md, which both read.
What should a handoff note include?
The current state (branch, PR, what passes and fails), what was done this block, what's in progress, the next three steps, decisions with who made them, and anything the next agent must not touch. Keep it short enough to read at the start of every session.
Where should I keep handoff notes for cloud agents?
Somewhere the cloud agent can reach over the network. Cursor's cloud agents can't read your local home directory, and Claude Code's auto memory isn't shared with cloud environments. A note served over MCP or a REST API, such as a LotsNotes note, reaches both local and cloud agents.
How do I stop two agents overwriting the same handoff note?
Have each agent send the version it read when it saves. In LotsNotes, save_context_note with expected_version fails with a conflict if the note changed since, and every earlier version stays restorable.
Sources
Checked on 22 October 2026:
- Claude Code docs: Manage sessions (resume, branch, export, transcript storage and retention, what a resume restores), CLI reference (
--continue,--resume,--name,--fork-session,--from-pr,--teleport), Commands (/compact,/branch,/export,/import), Memory (CLAUDE.md, AGENTS.md, auto memory is machine-local), Common workflows and MCP. - Codex docs (linked from developers.openai.com/codex): Custom instructions with AGENTS.md, Codex CLI commands (
codex resume,codex fork,/compact,/import), Import from another agent, Memories and MCP. - Cursor docs: Rules, MCP, Prompting (
@Chats, context summary), Agent overview (side chats) and Cloud agents. - LotsNotes: tool list, API docs, agent skill and setup guides.
