You tell Claude Code in your terminal that the API tests need a local Redis instance, and for days it starts one before running them. Then you open the same repository in Cursor, ask its agent to run the tests, and they fail on a missing Redis. It works the other way too: a rule you gave Cursor is not there when you start Claude Code. Nothing broke. The two agents never had the same knowledge to begin with.
The short answer: each tool keeps what it learns in its own place, and the terminal agent's place is a folder on your machine that the editor's documentation does not list among what it reads. Knowledge crosses between them only through something both of them read. Put each kind of knowledge where both tools will find it: the repository for project conventions, a shared memory for what you teach them along the way.
Disclosure: I work on Mnemoverse, the memory layer in the section near the end.
Claude Code documents this plainly. "Auto memory lets Claude accumulate knowledge across sessions without you writing anything." The page's own examples are "always use pnpm, not npm" and "remember that the API tests require a local Redis instance": "Claude saves it to auto memory."
And it says where that is: "Each project gets its own memory directory at ~/.claude/projects/<project>/memory/." The same section adds: "Auto memory is machine-local. All worktrees and subdirectories within the same git repository share one auto memory directory. Files are not shared across machines or cloud environments." (Claude Code memory docs) That covers a second laptop or a cloud session. On one machine, what keeps the editor out is simpler: the folder belongs to one tool.
That folder belongs to Claude Code. Cursor's documentation does name Claude locations it reads: a root CLAUDE.md, skills in ~/.claude/skills/, subagents in ~/.claude/agents/. The memory directory under ~/.claude/projects/ is not among them. So the correction you gave in the terminal is real, it persists, and it stays on one side.
Cursor's rules page describes its mechanism in one line: "When applied, rule contents are included at the start of the model context." Rules live in .cursor/rules, in an AGENTS.md, or as User Rules in Cursor's settings. You write them, or ask the agent to: "Type /create-rule in Agent and describe what you want. Agent generates the rule file with proper frontmatter and saves it to .cursor/rules."
The same holds in the other direction. A User Rule is text in Cursor's settings, and Claude Code's memory page mentions .cursor/rules/ only as something /init reads when it drafts a CLAUDE.md, a copy made once. After that, a rule you add in Cursor stays in Cursor.
So each side has its own store, filled in its own way. Switching tools does not lose knowledge. It switches to a different store.
Project conventions: in the repository. "Use pnpm", "tests need a local Redis", "API handlers live in src/api/". These are true for anyone working on the code, in any tool, so they belong in a file that travels with it. An AGENTS.md at the root is read by Cursor, and by Claude Code v2.1.277 or later when there is no CLAUDE.md, .claude/CLAUDE.md or CLAUDE.local.md in the working directory or above it; if there is one, a line @AGENTS.md inside that CLAUDE.md imports the shared file. In the terminal, ask for the file rather than the memory. The same Claude Code page describes the alternative to auto memory: "To add instructions to CLAUDE.md instead, ask Claude directly", and you can ask for AGENTS.md the same way.
Things you teach along the way: in a memory both tools reach. Your preferences, a correction that is about you rather than the repo, the reason behind a decision. These do not belong in a shared repository file, and they should not live in one tool's folder either. A memory server that both tools reach over MCP sits outside either tool, so a note written from one side is readable from the other.
What the agent can read from the code: nowhere. Claude Code's own rule for auto memory is a good one to borrow: "Claude skips anything it can derive from the codebase, such as architecture, file paths, or debugging fixes."
Auto memory is on by default, so the terminal side has likely been learning for weeks. The page makes it easy to look: "Auto memory files are plain markdown you can edit or delete at any time." Run /memory and open the auto memory folder. MEMORY.md is the index, one line per note, and it loads into every session; the notes are separate files. For each note decide: a project convention goes into AGENTS.md, a personal preference goes into the shared memory, anything stale goes. Then delete the note and its line in MEMORY.md, so one copy is left to change. Before you delete a convention, run /memory and check that AGENTS.md is in the list; if it is not, Claude Code does not read it, and the convention would be gone from the terminal side.
Connect both tools to the same account. In the terminal, from our Claude Code page:
claude mcp add -s user --transport http mnemoverse https://mcp.mnemoverse.com/mcp
then sign in through /mcp in a Claude Code session. In Cursor, the Add to Cursor button on our Cursor page adds the same hosted server; then open Customize, click Connect next to mnemoverse, and approve the sign-in in the browser. Our Claude Code page puts the rule in one line: "Same Mnemoverse account, same memories, in every tool." Signed in as the same account, the terminal and the editor read and write one store.
Connecting adds tools; it does not make the agent call them, so each tool also needs a standing instruction to read before answering and to save what it is taught. One block in the root AGENTS.md reaches both tools under the conditions above; otherwise put it in CLAUDE.md for Claude Code and in .cursor/rules/mnemoverse.mdc with alwaysApply: true for Cursor, since without that line a rule is included only when you @-mention it. The block is on our agent memory page. In Claude Code, "remember ..." can still land in auto memory, as quoted above; for anything both tools should see, say "Save this to Mnemoverse memory: ...".
memory_write; if the interface only shows a message like "Saved 2 memories", it went to auto memory instead.memory_read call you can see in the chat. The second should not come back at all; if it does, it reached a file both tools read, such as a root CLAUDE.md or AGENTS.md, and the first answer proves nothing until you find which.
The library page covers memory servers over MCP in general: what they are, how to choose one, and how to tell whether one works. What did your terminal agent learn last week that your editor still does not know?
The Python SDK is on PyPI as mnemoverse, and the MCP server package on npm is open source (MIT): github.com/mnemoverse/mcp-memory-server.