Cursor context
mdmanager models the rule loader of the Cursor editor's agent, based on the Cursor 3.25.9 editor.
Cursor documents little of it, so a later release can change it. mdmanager has no Context runtime
for the Cursor CLI (cursor-agent); for Grok Build, see mdmanager docs grok.
mdmanager context --runtime cursor
Context treats the editor as launched on a workspace folder. It reports Project Rules, the .mdc
files under .cursor/rules/, as always-applied, glob-scoped, intelligently selected, or manual.
Cursor User and Team Rules live in Cursor settings rather than Markdown files. Context notes that
boundary but cannot inspect their contents.
What loads
At startup Cursor reads every directory from the workspace folder up to the filesystem root, not
only the project. In each one it loads .cursor/rules/**/*.mdc, then CLAUDE.md,
CLAUDE.local.md, and AGENTS.md; Context lists them in that order. Files above the project, such
as ~/.cursor/rules/, therefore apply to every project below them. It also loads a legacy
.cursorrules file as an always-applied rule from the root Git reports, or from the workspace
folder outside a repository.
- Markdown and rules are decoded first: a UTF-8 byte-order mark is dropped, UTF-16 with a byte-order mark is decoded, and CRLF line endings become LF when at least 5% of line endings are CRLF (for UTF-16, within its first 8 KiB). Files detected as binary are skipped and reported as excluded. Other encoding detection is not modeled.
- Each decoded Markdown instruction file is cut at 100 KiB on a UTF-8 boundary, then a truncation notice is appended. Context reports a longer file as partial; its included and total byte counts refer to the decoded file contents.
- A rule that does not start with a
---header followed by more text is skipped and reported as excluded. Only an unquotedalwaysApply: truemakes a rule always apply. AGENTS.md,CLAUDE.md, and rules in subfolders below the workspace folder were observed to attach only after the agent reads files there. Context does not scan them..cursorignorecan hide instruction files; Context does not model it.- The editor keeps duplicate Markdown: a
CLAUDE.mdsymlinked toAGENTS.mdloads twice. Context warns when the same instructions load twice at startup, even through two paths to one file, and compares rules without their header; see duplicate instructions. Remove the extra file or stop composing the repeated Sections into more than one of them. - The editor loads
CLAUDE.mdandCLAUDE.local.mdonly when its third-party extensibility setting is on, which Context cannot read, so it reports them as uncertain.
Managed files
- The Global target
cursor, created bymdmanager init cursor, renders~/.cursor/rules/mdmanager.mdcwith analwaysApply: trueheader. The editor loads it for every workspace below your home directory. Other runtimes, Grok included, do not read.mdcrules. - Project Instructions target root
AGENTS.md, shared by Cursor, Codex, Grok, and Pi. Cursor also loads rootCLAUDE.md. - Local
CLAUDE.local.mdreaches Cursor as well as Claude. - Cursor has no equivalent of mdmanager's Local
AGENTS.override.mdmechanism.
Cursor system instructions, User and Team Rule contents, skills, hooks, tools, and conversation
state are outside mdmanager's scope. Grok runs matcher groups from Cursor's hooks.json files, so
mdmanager context --runtime grok reports them; see mdmanager docs grok.