MemoryLake
Back to all articles
TutorialJuly 27, 2026·6 min read

How to Migrate From Cursor to Claude Code Without Losing Context (2026)

With Claude Opus 5 fresh out and Claude Code riding the wave, a lot of Cursor users are giving the terminal-native agent a serious look. Then comes the catch: your Cursor setup — the rules, the accumulated project understanding, the decisions you and the agent worked out — doesn't just move over. Claude Code starts by greping your repo like it's day one.

The short answer: there's no import from Cursor into Claude Code. You can hand-carry your rules into `CLAUDE.md`, but the dynamic context — what Cursor learned about your project across sessions — has no export, so the migration is manual and partial unless you keep that context in a shared layer both tools read.

This guide covers how to move a Cursor workflow into Claude Code, what won't survive, and how to make the switch without relearning your own codebase.

Why Your Cursor Context Doesn't Follow You to Claude Code

What each tool stores

Cursor keeps context in repo-committed rules (.cursor/rules/, legacy .cursorrules) plus local session memory and generated Memories. Claude Code reads CLAUDE.md files at startup and works from your codebase, holding session context in its window. The static rules have rough equivalents on both sides; the dynamic understanding — decisions, corrections, accumulated project knowledge — has no shared home.

The technical reason it doesn't transfer

Rules are just text, so translating .cursor/rules/ into CLAUDE.md is doable by hand. But Cursor's session memory lives in local app state with no export, and Claude Code has no importer for it. So the part that made your Cursor genuinely useful — everything it learned beyond the written rules — doesn't come with you. Claude Code rebuilds its own understanding from the code, from scratch.

What this costs you

You re-onboard the agent on a codebase your previous tool already understood: the same conventions re-stated, the same decisions re-explained, the same corrections re-made. Anything that lived only in Cursor's session memory — never written into a rules file — is simply gone. And if you keep Cursor around for some work, the two tools' understanding of the project immediately diverges.

Step-by-Step: Moving From Cursor to Claude Code by Hand

The native route is manual, but it gets the essentials across.

Step 1: Extract what Cursor holds

  1. Copy your .cursor/rules/*.mdc and any legacy .cursorrules content.
  2. Review Cursor's Memories for this project and copy the accumulated facts worth keeping — there's no bulk export, so this is manual.
  3. Note the decisions and conventions that live in your head or in past chats but never made it into a rules file.

Step 2: Set up Claude Code

  1. Create or update CLAUDE.md at the repo root with your conventions, translated from the Cursor rules.
  2. Add the salvaged Memories and decisions into CLAUDE.md or a docs file Claude Code will read.
  3. Re-add any MCP servers you relied on in Cursor to your Claude Code MCP config.

What you get is a translated baseline: rules rewritten as CLAUDE.md, plus whatever context you remembered to salvage. There's no transfer of session history, and nothing here stays in sync with Cursor if you keep using it.

What doesn't survive the migration

Cursor's session-level understanding that never reached a rules file. Conversation history from past Cursor sessions. And the sync is one-time — refine CLAUDE.md next month and any teammate still on Cursor won't see it, and adding a third tool means translating context again. It's the cross-machine and cross-tool context gap showing up at the moment you switch.

The Better Way: One Memory Layer for Both Agents

The migration is only hard because context lives inside each tool. Lift it into a neutral layer and Cursor and Claude Code read the same source. MemoryLake stores your conventions, architecture, and decisions once — versioned Git-style, end-to-end encrypted — and serves them to both agents over MCP, so switching is a connection, not a rebuild.

DimensionManual Cursor → Claude CodeMemoryLake layer
Steps requiredTranslate rules + salvage memory3 (one-time)
Dynamic project understandingMostly lostRetained and searchable
Stays in sync during a gradual switchNoYes
Works with a third agent laterTranslate againConnect it
Version history of decisionsNoYes (Git-style)

Step 1: Create an API key

Sign in to MemoryLake, generate a key, and make your first request — it takes about 30 seconds.

Create a MemoryLake API key
Create a MemoryLake API key

Step 2: Upload your first memories

Drop in the project knowledge both agents need: conventions, architecture notes, decisions, and reference docs — documents, images, and other files all work — instead of trapping them in one tool's rules format.

Upload your first memories to MemoryLake
Upload your first memories to MemoryLake

Step 3: Connect your AI & agents

Both tools speak MCP: add MemoryLake to Claude Code's MCP config and to .cursor/mcp.json with your API key. During a gradual switch, neither agent falls behind — and the same memory is available to Codex, OpenClaw, and other agents via MCP or the API, so your next tool just connects.

Connect your AI and agents via MCP
Connect your AI and agents via MCP

What Re-Onboarding an Agent Actually Costs

The switching tax

Moving coding agents means re-teaching a codebase the last one already knew — conventions, decisions, corrections, restated by hand. In an agent billed by usage, the fresh grep-and-rebuild also burns tokens on rediscovery before any work happens.

Retrieval instead of re-onboarding

With a shared layer, Claude Code pulls your project's conventions and decisions on demand instead of reconstructing them, so it starts informed on day one. Cheaper, faster, and switching back or adding a tool later costs nothing — MemoryLake's Token Saving Calculator projects the effect from your usage.

Best Practices for a Cross-Agent Memory

Put dynamic context in the layer, conventions in the repo

Keep stable rules in CLAUDE.md / .cursor/rules/ where each tool reads them, and dynamic context — decisions, resolved issues, project understanding — in the shared memory. Each goes where it belongs.

Salvage before you switch

Cursor's session memory is the part that vanishes. Capture it into the shared layer before you commit to Claude Code, so the switch loses nothing.

Scope by repository

One memory scope per repo keeps both agents' context precise and prevents one project's conventions from bleeding into another's.

Conclusion

Cursor and Claude Code both do strong work, but moving between them means rebuilding by hand — and the accumulated understanding that made your setup good is exactly the part that doesn't export. Keep that context in a shared memory layer instead, and the switch becomes a connection: both agents read the same conventions and decisions, kept in sync, ready for whatever you adopt next. Migrate once; let every agent share the memory.

Frequently asked questions

Can I import my Cursor setup into Claude Code?

No. Rules files can be translated into CLAUDE.md by hand, but Cursor's session memory lives in local app state with no export, and Claude Code has no importer for it. The dynamic context is what you lose without a shared layer.

Will translating my `.cursor/rules` to `CLAUDE.md` be enough?

It moves the static conventions, which is the easy part. It won't move the decisions, corrections, and project understanding Cursor accumulated in session memory — those need to be salvaged manually or kept in a neutral layer.

What about my past Cursor conversations?

They stay in Cursor; neither tool imports the other's history. Capture any decisions worth keeping into rules or a shared memory before you switch. Related: migrating Cursor rules to Claude Code.

How do I switch without relearning my codebase?

Keep your project context in a memory layer both agents read. With MemoryLake, Claude Code retrieves your conventions and decisions over MCP on day one, so it starts informed instead of re-greping from scratch.

Can I run Cursor and Claude Code side by side?

Yes — that's the smoother path. With a shared memory over MCP, both agents stay current during a gradual switch, so you can move work over gradually instead of migrating everything at once.