Enterprise Hook Control: allowManagedHooksOnly Policy Setting#
What's wrong with this entry?
What: New policy setting that restricts hook execution to only those defined in managed enterprise settings, blocking user, project, local, and plugin hooks.
How to use: Configure in your managed policy settings:
{
"policySettings": {
"allowManagedHooksOnly": true,
"hooks": {
"PreToolUse": [...]
}
}
}
Details:
- When enabled, only hooks from
policySettings.hookswill execute - Plugin hooks are explicitly skipped with log message "Skipping plugin hooks - allowManagedHooksOnly is enabled"
- Complements existing
disableAllHookssetting by providing a middle ground - Evidence:
eQ1()at line 337237,VA0()at line 337232, policy schema at line 503153
Related
Other releases about the same thing. Found by shared names or similar wording; neither means one caused the other.