context_injection | Translated
Conversion type: Translated Actively mapped to the target provider’s equivalent field during conversion. Learn more → | Hooks can inject context at session initialization via the sessionStart event, enabling custom context to be added to the agent's active session at startup. |
| Cursor hook event set | Translated
Conversion type: Translated Actively mapped to the target provider’s equivalent field during conversion. Learn more → | Cursor documents lifecycle events for both Agent (sessionStart, preToolUse, beforeShellExecution, afterFileEdit, stop, and related pre/post tool hooks) and Cursor Tab inline completions (beforeTabFileRead and related Tab-specific hooks). |
decision_control | Translated
Conversion type: Translated Actively mapped to the target provider’s equivalent field during conversion. Learn more → | Exit codes drive decisions: exit code 2 blocks the action, exit code 0 allows it to proceed; JSON on stdout can also return structured decision fields. |
handler_types | Translated
Conversion type: Translated Actively mapped to the target provider’s equivalent field during conversion. Learn more → | Two handler types documented: command (shell scripts communicating over stdio via JSON) and prompt (LLM-evaluated natural language conditions for policy enforcement without custom scripting). |
hook_scopes | Translated
Conversion type: Translated Actively mapped to the target provider’s equivalent field during conversion. Learn more → | Four scopes documented in priority order: Enterprise (system-wide MDM-managed), Team (cloud-distributed for Enterprise plans), Project (.cursor/hooks/ in the repository), and User (global personal configuration at ~/.cursor/hooks/). |
json_io_protocol | Translated
Conversion type: Translated Actively mapped to the target provider’s equivalent field during conversion. Learn more → | Command hooks receive event data as JSON on stdin and may return structured JSON on stdout to signal decisions and supply output fields. |
matcher_patterns | Translated
Conversion type: Translated Actively mapped to the target provider’s equivalent field during conversion. Learn more → | Hook entries accept a matcher string that filters which tool or event fires the hook (for example a specific shell command or tool name). |
| Cursor Tab inline completion hooks | Not portable
Conversion type: Not portable Unique to this provider — can’t be carried across providers. Learn more → | Separate hook events (e.g., beforeTabFileRead) fire for Cursor Tab inline completion operations, distinct from Agent hook events, enabling separate control policies for inline vs. Agent-mode completions. |
| Enterprise and Team hook scopes | Not portable
Conversion type: Not portable Unique to this provider — can’t be carried across providers. Learn more → | Cursor supports Enterprise (MDM-managed system-wide) and Team (cloud-distributed for Enterprise plans) hook scopes above the Project and User levels, enabling organization-wide hook policy deployment. |
| Hooks wired through .cursor/settings.json | Not portable
Conversion type: Not portable Unique to this provider — can’t be carried across providers. Learn more → | Hook files under .cursor/hooks/ are activated via entries in .cursor/settings.json; enabling or disabling a hook means editing the settings file, not moving the hook file itself. |
| Partner ecosystem hooks | Not portable
Conversion type: Not portable Unique to this provider — can’t be carried across providers. Learn more → | Cursor partners with ecosystem vendors (MintMCP, Semgrep, Snyk, 1Password, and others) who have built pre-built hook integrations covering security scanning, governance, and secrets management. |
| Prompt (LLM) handler type | Not portable
Conversion type: Not portable Unique to this provider — can’t be carried across providers. Learn more → | Prompt-based hooks leverage an LLM to evaluate natural language conditions, enabling policy enforcement without custom scripting — the model determines whether to allow or block based on a natural language rule. |