How to share memory between Cursor and Claude Code
Cursor and Claude Code keep different personal context. Use repo rules, task handoffs, live tools, and shared team decisions so work can move between them without a fresh explanation.
You prototype a change in Cursor, then move to Claude Code to finish it.
The branch moves with you. The uncommitted diff moves with you. The reasoning does not.
Claude can inspect what changed, but it cannot see why Cursor rejected the first approach, which test still fails, or which product decision limits the fix. You spend ten minutes rebuilding the brief. If you miss one detail, the second agent may "fix" something the first agent already learned not to touch.
Cursor and Claude Code do not need identical memories. They need a shared handoff and the same active team constraints.
Native memory is not the bridge
Cursor has project rules and its own ways to retain useful context. Claude Code reads CLAUDE.md files and can keep auto memory for recurring personal patterns. Those systems improve continuity inside each tool.
They are not one shared database. A fact one tool learned about your workflow does not automatically become available to the other. A teammate's personal memory may be different again.
Trying to mirror every native memory creates a sync problem and a privacy problem. Personal preferences, temporary observations, and abandoned ideas get mixed with rules the whole team must follow.
The bridge should be smaller and vendor-neutral.
Share four layers, not one giant context file
Stable repository instructions
Put commands, directory boundaries, coding conventions, and hard invariants in a version-controlled file that both tools can read.
AGENTS.md is the simplest neutral baseline. Cursor can also use scoped project rules in .cursor/rules, while Claude Code can use CLAUDE.md. Avoid maintaining the same paragraph manually in three places. Keep shared constants in one source and reserve tool-specific files for tool-specific behavior.
Cursor's documentation explains that project rules are version-controlled and can apply always, by file pattern, by relevance, or manually. Claude Code's documentation similarly treats CLAUDE.md as persistent project guidance. Both are strongest when the instructions are short and stable.
For the broader tool landscape, see the best ways to give AI coding agents your team's context.
Current task handoff
When work moves from Cursor to Claude Code, create a compact handoff:
- requested outcome;
- branch and files changed;
- approaches tried and rejected;
- tests run and exact failures;
- unresolved questions;
- next safe step.
This is working state, not permanent memory. It should help the second agent continue the task without replaying the first conversation.
Live reference data
Issues, production errors, current documentation, and customer records change. Do not copy them into a memory file and assume they stay true. Let the agent query the current source through a focused integration or MCP server.
Our guide to MCP servers for engineering teams compares the common live-context sources and their access models.
Approved team decisions
The most important shared layer is not a transcript. It is the set of product and architecture calls that both agents must honor:
- verdict;
- reason;
- owner;
- status;
- affected code or behavior;
- rejected option;
- replacement when the answer changes.
A task handoff may mention one of these decisions, but the decision should live beyond the task. That is what stops the next tool, teammate, or agent from reopening it.
A Cursor-to-Claude Code handoff example
A useful handoff might say:
Goal: move guest checkout analytics to the server. Cursor changed
checkout/events.tsand added two tests. The client-only approach was rejected because retries produced duplicate events. One test still fails when payment confirmation arrives asynchronously. Active decision: guest checkout identity is created before payment until migration M-42 ends; Priya owns exceptions. Next step: inspect the server idempotency key before changing the event order.
This gives Claude Code enough to continue. It does not paste 40 pages of chat or ask the model to infer which paragraph matters.
The active decision should also exist in the shared team record, tied to the checkout paths. If the migration ends or Priya changes the call, the record can be superseded without rewriting old handoffs.
Do not sync these things blindly
Full chat histories
A transcript contains exploration, wrong turns, pasted secrets, and statements that were later corrected. More text does not mean clearer authority.
Auto memory from one person's account
Personal memory can include preferences that should not govern another teammate's work. Promote only the stable, team-approved parts.
Generated summaries with no review
A summary can drop the exact exception that made a decision safe. Treat it as a draft handoff. Verify the load-bearing constraints.
Stale copies of live systems
A copied ticket or API document becomes wrong quietly. Link or query the current source instead.
A setup both tools can use today
- Create one neutral repo guide. Keep commands, boundaries, and invariants in AGENTS.md or a shared source referenced by both tool-specific files.
- Use a handoff template. Make every tool switch carry outcome, current state, evidence, open questions, and next step.
- Connect focused live sources. Give agents access only to the issue tracker, docs, or errors the task needs.
- Keep decisions outside personal chat history. Record approved calls with owners, status, and scope.
- Brief before editing. Have Cursor or Claude retrieve the decisions connected to the files it will change.
- Stop on disagreement. A new prompt should not silently override an existing team decision; route the conflict to its owner.
This is also the answer when Cursor loses context mid-project: separate information by job instead of building one ever-growing memory file.
Where Lockstep fits
Lockstep keeps the shared decision layer. It captures possible decisions from Slack, docs, tickets, and code discussions, asks the owner to confirm them, and ties the approved version to what it affects. Cursor, Claude Code, and other MCP-compatible agents can query the same current decisions before they act.
It does not replace Cursor rules, CLAUDE.md, AGENTS.md, or a task handoff. Those carry repository instructions and current execution state. Lockstep carries the team calls that must remain true across tools and sessions.
If your team already has a decision log, compare the available options and their tradeoffs. The useful question is not where the note sits. It is whether both agents receive the active answer before they change the code.
The goal is not perfect memory sync.
It is a handoff that preserves the work, and a shared decision record that preserves the why.
Frequently asked questions
- Can Cursor and Claude Code share memory automatically?
- Their native personal memories are separate. They can share vendor-neutral repository files, a task handoff committed or stored with the project, live systems exposed through MCP, and a shared decision source that both agents query.
- Should I copy a Cursor chat into Claude Code?
- Copying a short, reviewed handoff can help. Copying the whole chat carries rejected ideas, stale instructions, and irrelevant detail. Give Claude Code the current goal, work completed, evidence, open questions, and active decisions instead.
- Which files work in both Cursor and Claude Code?
- AGENTS.md is the clearest vendor-neutral repository instruction file. Cursor also has project rules, and Claude Code has CLAUDE.md. Keep shared constants in a common file and use tool-specific files only for behavior that truly belongs to that tool.
- What information should be shared between coding agents?
- Share stable repository constraints, the current task state, relevant live references, and approved product or architecture decisions. Avoid syncing raw personal memory, credentials, or every conversation.
Keep reading