Skip to contentllms.txt

hook_scopes

Where hooks can be configured and the precedence model when multiple scopes define hooks for the same event. Common scopes: global/user, project, workspace, managed/enterprise.

Type: object Content type: hooks

ProviderSupportedMechanism
claude-code✓Six scopes: user (~/.claude/settings.json), project (.claude/settings.json), local (.claude/settings.local.json), managed policy, plugin (hooks/hooks.json), component frontmatter (skill/agent)
cline✓global_and_project_hooks: Cline supports global (user-wide) and project-level hook configuration
codex✓hook_scope: Codex hooks can be scoped to global/user or project configuration
crush✓Hooks are configured in crush.json under the hooks key, which applies at the project or user-global config level (same config file scope as MCP and other settings).
cursor✓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/).
factory-droid✓Four scopes documented: user-level (~/.factory/settings.json), project-level (.factory/settings.json), local-uncommitted (.factory/settings.local.json), and enterprise managed policies
pi✓Extensions load from global scope (~/.pi/agent/extensions/) and project-local scope (.pi/extensions/); both scopes are auto-discovered and can be combined
windsurf✓three_config_scopes: global (user-wide), workspace, and managed/enterprise hook configuration scopes
amp✗Project only: hooks live in a single 'amp.hooks' array inside '.amp/settings.json' (or user-scope settings); no multi-scope layering documented
copilot-cli✗Copilot CLI hooks are configured at a single scope level; no multi-scope configuration documented
gemini-cli✗Gemini CLI hooks are project-scoped; no multi-scope configuration documented
kiro✗Kiro hooks are project-scoped; no multi-scope configuration documented
opencode✗not documented
roo-code✗not documented
zed✗not documented