BuildGist

How to keep context when you switch from Claude Code to Cursor

Kayvan Zahiri ·

To keep context when you switch from Claude Code to Cursor, open Cursor on the same folder, make both agents read the same instructions file, and bring the task across with a short note or with Continue on the BuildGist card. The code is already in the folder. The rules and the task are what you carry.

Three kinds of context

The first needs nothing from you. The second is a one-time fix. Most lost context is the third kind, and it has to be carried every time you switch.

Make both read the same rules

Claude Code reads CLAUDE.md. Cursor reads AGENTS.md and its own rules in .cursor/rules, which have to be .mdc files: Cursor's rules documentation says a plain .md file there is ignored. Rules written only in CLAUDE.md do not reach Cursor.

The simplest fix is one file. Put the rules in AGENTS.md. Claude Code's memory documentation, read on October 16, 2026, says Claude Code reads AGENTS.md when the project has no CLAUDE.md. If you keep a CLAUDE.md, make its first line an import, and keep only what is specific to Claude Code below it:

@AGENTS.md

## Claude Code only
Use plan mode for changes to the auth folder.

Now a rule you change once reaches both agents.

Carry the task

Before you leave Claude Code, see what is in the working tree:

git status
git diff --stat

Then write the task down. Use your own. This one is the BuildGist home page's example:

Task: Add login with Google.
Done so far: the sign-in button, where Google sends you back, and the browser's signed-in
status. See the diff.
Ruled out: storing passwords ourselves.
Not done: deleting a note does not check that the note belongs to the signed-in user.
Next step: add that check.

The "Ruled out" line matters most. It is the decision Cursor would otherwise reopen, because nothing in the code says it was considered.

Open a new Cursor chat and paste it as the first message. A chat that already has messages is the wrong place: start a new one. Ask Cursor to say the task and the next step back before it edits anything. The step-by-step version is in how to hand off a task from Claude Code to Cursor.

Or choose Continue

BuildGist works with Claude Code, Cursor and Codex. When you start a new chat in Cursor in the same project, a BuildGist card at the bottom right of your screen offers the earlier agent's task, titled Continue in Cursor. Choose Continue and the new chat starts with that task's context. Choose Start fresh to skip it. Nothing is handed over unless you choose Continue.

The context is your own words: the task, and constraints you typed. It does not include the transcript or the patch. The card needs BuildGist for Mac to be open, offers tasks active in the last 12 hours by default, and Cursor's handling of the context is best effort. If the new chat does not show the task, paste the note.

What stays behind in Claude Code

Undoing is in how to undo Claude Code changes.

Coming back to Claude Code

claude --continue reopens the last Claude Code session in the folder, but that session does not know what Cursor did. Read the new diff, then tell it, or choose Continue on the card when you start a new Claude Code session. Where those sessions are kept is in where Claude Code keeps session history.

BuildGist also writes a plain-English explanation after each meaningful run of either agent, so the Inbox shows what each one did to the code. It is written by AI, so check important behavior against the code and tests.

What you need

Codex needs you to approve BuildGist once, in Codex. BuildGist shows the steps. Setup is in Getting started.

To explain a run, your computer sends BuildGist what that run needs, and BuildGist passes it to Anthropic. BuildGist does not keep this material. It does not send your whole repository, files the run did not change, or files named like secrets, such as .env files and keys. It keeps the explanation and short cited excerpts of changed code, at most 12 lines each. Secret masking is best-effort. Privacy has the full list.

Every account gets 7 days of BuildGist Pro free, with no card. The 7 days start at your first explanation or Continue handoff. Nobody is charged when the trial ends. After that, BuildGist Pro is $12 per month, plus any applicable tax shown at checkout. See pricing.

Try BuildGist

Apple silicon, macOS 12 or later. United States, 18 or older.

Related

Questions: kayvanandre@gmail.com.