Repository navigation
Adapter Cursor
The Cursor adapter (harness cursor) discovers Cursor configuration
statically. It never starts Cursor, runs a hook, starts an MCP server, or
invokes git. Every repository file is treated as attacker-controlled.
Cursor also loads AGENTS.md and .vscode/ files (reported by the
generic adapter) and Claude Code hooks from
.claude/settings.json (reported by the Claude adapter).
Agent transcripts are not read.
| Location | Normalized kinds |
|---|---|
.cursor/hooks.json |
hook |
.cursor/mcp.json |
mcp-server |
.cursor/rules/**/*.mdc, .cursor/rules/**/*.md
|
instructions (role rule) |
.cursorrules (legacy) |
instructions (role cursorrules) |
.cursor/environment.json (cloud agents) |
env-setup |
All are matched at any depth and case-insensitively. Cursor runs project
hooks in any trusted workspace; Cursor cloud agents run the repository's
.cursor/hooks.json command hooks.
~/.cursor/hooks.json and ~/.cursor/mcp.json. Cursor documents no
variable that moves this directory. User hooks do not run in cloud agents.
The enterprise (MDM) hooks file:
| OS | Path |
|---|---|
| macOS | /Library/Application Support/Cursor/hooks.json |
| Linux, WSL | /etc/cursor/hooks.json |
| Windows |
%ProgramData%\Cursor\hooks.json (default C:\ProgramData) |
Team hooks distributed from the dashboard are a separate mechanism; see Not scanned in v0.
- The Dockerfile named by
.cursor/environment.jsonbuild(for example.cursor/Dockerfile).buildis reported as anenv-setupitem, but the Dockerfile it names is not read, so itsRUNinstructions are not scanned. Reading that Dockerfile is planned for v0.1 (#32). - Team hooks distributed from the Cursor dashboard
(
~/.cursor/managed/team_*/hooks/): these are scripts, not ahooks.json, and are not read. - A file-level switch that turns every hook off. Cursor's hooks
reference lists one global option,
version(Cursor hooks, reviewed 2026-11-02). Loading Claude Code hooks is gated by Cursor Settings → Agents → Third-Party Imports → Include Third-Party Plugins, Skills, and Other Configs (Third Party Hooks), which is not a key in a committed file. This adapter does not emit a kill switch, and TC-CFG-016 has no Cursor clause. - Agent transcripts.
-
.vscode/settings.json(task.allowAutomaticTasks,chat.tools.autoApprove), which several Cursor surfaces also honor: see generic.md.
Every key below also carries a trailing content digest of the full
sanitized entry, so two entries that match on the fields listed here but
differ elsewhere (two terminals with the same name and command but a
different env.NODE_OPTIONS, say) still get distinct keys and
fingerprints; see fingerprint.md. When sanitizing removed
anything from the entry, in any field (a --token value in
commandWindows, a redacted env value, a URL query), the key also
ends with a secret discriminator (sig:k1: with a fingerprint
key, sig:s1: without one), so entries that differ only in what
redaction replaced with [REDACTED] stay distinct too.
- Hooks (
{"version": 1, "hooks": {"<event>": [{handler}, ...]}}): one item per handler with every field (command,type,prompt,model,matcher,timeout,failClosed,loop_limit, ...) andevent. The key is["hook", event, matcher, type, action], where the action iscommandor, for a prompt hook,prompt. All events are accepted, including the documentedsessionStart,sessionEnd,preToolUse,postToolUse,postToolUseFailure,subagentStart,subagentStop,beforeShellExecution,afterShellExecution,beforeMCPExecution,afterMCPExecution,beforeReadFile,afterFileEdit,beforeSubmitPrompt,preCompact,stop,afterAgentResponse,afterAgentThought,beforeTabFileRead,afterTabFileEdit, andworkspaceOpen. - MCP servers (
mcpServers): as for Codex. - Rules: the Markdown body as
contentand the frontmatter (description,globs,alwaysApply, ...). Cursor parses rule frontmatter leniently (for example an unquotedglobs: *.ts), so frontmatter that is not valid YAML is read askey: valuelines without a diagnostic. -
environment.json: oneenv-setupitem per top-level member (install,start,build,snapshot, ...),{"setting", "value"}, and one per entry ofterminals(name,command, ...).
Cursor's JSON files are parsed as JSONC: a byte-order mark, comments, and
trailing commas are accepted. A hooks.json without a positive integer
version is reported and its hooks are still emitted. Duplicate keys use
the last value and are reported; keys that differ only by case are
reported. Nesting deeper than 64 levels fails closed.
Reads, symlink handling, limits, and diagnostics are those of the Claude adapter.
tripcord hook --harness cursor takes --event pre-tool
(preToolUse), before-shell (beforeShellExecution), and
before-read (beforeReadFile). The input's hook_event_name must
match. ParseHookInput keeps the tool name and the command, file path,
and url of tool_input, the command of a shell execution, or the
file_path of a read; the content Cursor sends with a read is dropped.
RenderDecision writes {"permission": "allow" | "deny", "user_message", "agent_message"}, and ask on beforeShellExecution. A deny also
exits 2 with the reason on stderr. See Hook.
This wiki is generated from docs/ on main by cmd/wikigen. Do not edit it here: change docs/ and open a pull request. Apache-2.0.
Start
Commands
CI and hooks
Configuration
Adapters
- Claude Code
- Codex
- Cursor
- GitHub Copilot
- Gemini CLI
- OpenCode
- Windsurf
- Devin
- Dev Container
- Shared Files
Project