How do I keep the same rules across Cursor chats, Claude Code and my teammates?
Put the rules in a file that lives in the repository: Cursor's own Project Rules (.cursor/rules) and AGENTS.md do that for rules you write by hand, and jevmem does it for the rules you state in a chat, saving them as lines in JEVMEM.md, which Cursor, Claude Code and Codex read and your teammates get through git.
What Cursor gives you #
Cursor's rules come in four kinds: User Rules, set in Cursor's settings, which apply across all your projects; Project Rules, .mdc files in .cursor/rules that are committed with the code; Team Rules, managed from Cursor's dashboard on Team and Enterprise plans; and AGENTS.md, a plain Markdown file in the project. All of them are written by hand.
What jevmem adds #
A rule often comes up in the middle of a chat ("we use pnpm, not npm") and is never written into a rules file. With jevmem on in a project, Cursor's hooks save the decisions, rules and failed approaches from each finished agent turn to JEVMEM.md (since 0.7.4), and before a non-trivial task the agent looks up the project's lines with jevmem's search_memory tool, over MCP. The same file is read by Claude Code, where lines come back on every prompt and the guard checks each command and edit against the rules before it runs, and by Codex over MCP.
In Cursor, on 10 held-out chats captured before the code was written (24 turns), jevmem paired 21 of 24 turns whole on the first run, and 24 of 24 after a reader fix, with what to save right in 21 of 24 (first run; how it was measured).
One file for each repository #
jevmem keeps memory per project: each repository has its own JEVMEM.md, and you turn jevmem on in each one with jevmem setup. The jevmem plugin for Cursor (0.7.6) runs in every Cursor window and stays silent in a project where jevmem is off. A rule you want in every project belongs in Cursor's User Rules; a rule for one codebase belongs in that codebase, where jevmem keeps it. Rules you already wrote can come in: jevmem import reads .cursor/rules/*, AGENTS.md and CLAUDE.md, prints what it would add, and writes it with --apply.
Which tools read it #
Saving is automatic in Claude Code and, since 0.7.4, in Cursor, where Cursor's hooks save each finished agent turn (since 0.7.6 from the jevmem plugin for Cursor, or from the files jevmem init --tool cursor writes); and in Codex while jevmem watch runs. Cursor, Codex and Claude Desktop reach jevmem over MCP, a standard way for an AI tool to call another program, when the agent asks for it; the Cursor plugin's server runs in every window, while a project's own .cursor/mcp.json server starts off until you turn it on once (the step). In Cursor, on 10 held-out chats captured before the code (24 turns), the first run paired 21 of 24 turns whole, the prompt with the whole reply; a reader fix came from that run, and the second run paired 24 of 24, with what to save right in 21 of 24 (measured).
| Saving | Bringing it back | |
|---|---|---|
| Claude Code | Automatic, every turn | Automatic, every prompt |
| Codex | Automatic while jevmem watch runs |
When the agent asks, over MCP |
| Cursor | Automatic, every finished agent turn (0.7.4; the plugin since 0.7.6) | When the agent asks, over MCP (the plugin's server runs in every window; a project's own server needs one toggle in the Cursor app, the step) |
| Claude Desktop | When you ask it to, over MCP | When you ask it to, over MCP |
The MCP server is on the MCP Registry as io.github.Avinash-jetwani/jevmem. Client setup: docs/mcp.md · docs/install.md.
Set it up in Cursor #
The plugin, the CLI and the per-project step: jevmem in Cursor. The same file in Claude Code: install.
The limits, in short #
- jevmem needs a TypeSafe API key (where to get one, and the install steps).
- Message text is sent to TypeSafe to be scored, with common secrets scrubbed first (what leaves your machine).
- It is automatic in Claude Code and, since 0.7.4, in Cursor (as a Cursor plugin since 0.7.6, whose rule sits in every chat), automatic in Codex while
jevmem watchruns, and in Claude Desktop only when the agent calls it; in Cursor, bringing lines back is still the agent's call (what each tool does). - Rules every task must follow reach every session only when they are marked always-on (0.7.1), by Jev's reading or yours (jevmem next to CLAUDE.md).
- The guard is a backstop, not a sandbox (what it misses).
- The side pane is Claude Code only, 2.1.299 or newer: Cursor has no pane, and Claude Code for VS Code draws none yet (the pane).
Every limit, with the numbers: the FAQ.