[DOCS] PermissionRequest hook docs omit deny-rule and bypass-mode policy caveats
Documentation Type
Unclear/confusing documentation
Documentation Location
https://code.claude.com/docs/en/hooks
Section/Topic
PermissionRequest → "PermissionRequest decision control" and "Permission update entries"
Current Documentation
The PermissionRequest reference currently says:
updatedInput| For"allow"only: modifies the tool's input parameters before execution. Replaces the entire input object, so include unchanged fields alongside modified ones
updatedPermissions| For"allow"only: array of permission update entries to apply, such as adding an allow rule or changing the session permission mode
setMode| Changes the permission mode. Valid modes aredefault,acceptEdits,dontAsk,bypassPermissions, andplan
The guide page also says:
Themodevalue is any permission mode likedefault,acceptEdits, orbypassPermissions, anddestination: "session"applies it for the current session only.
The permissions docs separately say:
To preventbypassPermissionsorautomode from being used, setpermissions.disableBypassPermissionsModeorpermissions.disableAutoModeto"disable"in any settings file.
What's Wrong or Missing?
The PermissionRequest docs do not say that these hook-driven updates are still constrained by policy checks after the hook returns.
A. updatedInput lacks an explicit deny-rule caveat
The hook reference explains how to rewrite tool input, but it does not say the rewritten input is re-evaluated against permissions.deny before execution. Claude Code v2.1.110 explicitly fixed this path for PermissionRequest hooks that return updatedInput, so the hook docs should state that a rewrite does not bypass deny rules.
B. setMode: "bypassPermissions" lacks an explicit policy caveat
The hook docs say setMode can switch to bypassPermissions, but they do not say that this update is blocked when permissions.disableBypassPermissionsMode is set to "disable". v2.1.110 fixed this enforcement path too.
As written, the hook pages make it easy to assume PermissionRequest can always apply these updates once it returns "allow", even though active permission policy still wins.
Suggested Improvement
Add a short note under PermissionRequest decision control and mirror it in the guide example:
updatedInputis validated again against permission rules after the hook returns. Matchingpermissions.denyrules still block execution, and matchingaskrules still prompt.updatedPermissionsentries of typesetModeare validated against active policy settings.setMode: "bypassPermissions"should mention that it is rejected whenpermissions.disableBypassPermissionsModeis"disable".- Link these notes to the main permissions documentation so readers do not have to infer the interaction from separate pages.
Impact
Medium - Makes feature difficult to understand
Additional Context
Affected Pages:
| Page | Context |
|------|---------|
| https://code.claude.com/docs/en/hooks | PermissionRequest reference, updatedInput, and setMode behavior |
| https://code.claude.com/docs/en/hooks-guide | Example showing updatedPermissions with setMode |
| https://code.claude.com/docs/en/permissions | General deny-rule precedence and disableBypassPermissionsMode policy text |
Total scope: 3 pages affected
Source: Changelog v2.1.110
Exact changelog entry:
FixedPermissionRequesthooks returningupdatedInputnot being re-checked againstpermissions.denyrules;setMode:'bypassPermissions'updates now respectdisableBypassPermissionsMode
3 Comments
Strong +1 from the hook API integration side. The contract gap this docs issue points out has a concrete runtime manifestation:
PermissionRequesthook responses that returnbehavior: "allow"combined withupdatedPermissions: [{type: "setMode", mode: "bypassPermissions", destination: "session"}]have thesetModesilently dropped in 2.1.110, 2.1.111, and 2.1.112. Thebehavior: allowhalf is honored (the current tool call proceeds) but the mode switch never takes effect, and the hook receives no error feedback. OthersetModevalues in the same payload shape (acceptEdits, default, plan, dontAsk) continue to work, so the mechanism is live — only this one documented value is gated silently.No
disableBypassPermissionsModeis set in any scope here.Filed as a separate runtime bug with a product-agnostic minimal repro: #49525. Happy to keep both threads aligned.
Issue #48865 Verification
Title: [DOCS] PermissionRequest hook docs omit deny-rule and bypass-mode policy caveats
Issue Date: 2026-04-16
Verification Date: 2026-04-28
Status: RESOLVED
---
Issue Summary
This issue reports that the
PermissionRequesthook documentation describedupdatedInputrewrites andsetMode: "bypassPermissions"updates without clearly stating that rewritten input is still checked against active permission rules and that bypass-mode changes remain subject to policy restrictions.---
Verification Results
Claim 1: The
PermissionRequestreference now states thatupdatedInputis re-evaluated against deny and ask rulesStatus: RESOLVED
At https://code.claude.com/docs/en/hooks, line 1275: "
behavior|\"allow\"grants the permission,\"deny\"denies it. Deny and ask rules are still evaluated, so a hook returning\"allow\"does not override a matching deny rule". At https://code.claude.com/docs/en/hooks, line 1276: "updatedInput| For\"allow\"only: modifies the tool's input parameters before execution... The modified input is re-evaluated against deny and ask rules".Verdict: The hook reference now explicitly says that allowing a
PermissionRequestdoes not bypass matching deny rules and that rewritten input is re-checked against deny and ask rules.---
Claim 2: The
PermissionRequestreference now states thatsetMode: "bypassPermissions"is constrained by active policyStatus: RESOLVED
At https://code.claude.com/docs/en/hooks, line 1304: "
setMode|mode,destination| Changes the permission mode. Valid modes aredefault,acceptEdits,dontAsk,bypassPermissions, andplan". At https://code.claude.com/docs/en/hooks, line 1309: "setModewithbypassPermissionsonly takes effect if the session was launched with bypass mode already available... and the mode is not disabled bypermissions.disableBypassPermissionsMode. Otherwise the update is a no-op.".Verdict: The hook reference now documents the exact bypass-mode policy caveat the issue requested.
---
Claim 3: The guide page now mirrors the bypass-mode policy caveat and points readers to the permissions docs
Status: RESOLVED
At https://code.claude.com/docs/en/hooks-guide, line 400: "To set a specific permission mode instead, your hook's output can include an
updatedPermissionsarray with asetModeentry." At https://code.claude.com/docs/en/hooks-guide, line 403: "bypassPermissionsonly applies if the session was launched with bypass mode already available... and not disabled bypermissions.disableBypassPermissionsMode.". The linked policy page also states the control at https://code.claude.com/docs/en/permissions, lines 45-48, including: "Administrators can prevent this mode by settingpermissions.disableBypassPermissionsModeto\"disable\"" and "To preventbypassPermissionsorautomode from being used, setpermissions.disableBypassPermissionsModeorpermissions.disableAutoModeto\"disable\"in any settings file".Verdict: The guide now includes the missing bypass-mode restriction and links directly to the permissions documentation that defines the governing policy.
---
Current State
| Claim | Status |
|-------|--------|
|
updatedInputis documented as being re-evaluated against deny and ask rules | RESOLVED ||
setMode: "bypassPermissions"is documented as subject todisableBypassPermissionsMode| RESOLVED || The guide mirrors the bypass-mode policy caveat and links to permissions docs | RESOLVED |
---
Suggested Fix
N/A - issue has been resolved.
---
References
PermissionRequest decision controlnow says deny and ask rules are still evaluated and that modified input is re-evaluated against deny and ask rules.Permission update entriesnow sayssetModecan targetbypassPermissionsonly when that mode is available and not disabled bypermissions.disableBypassPermissionsMode.updatedPermissionsnow includes thebypassPermissionscaveat and links to the permissions page.permissions.disableBypassPermissionsModecan be set in any settings file.---
Conclusion & Recommendation
Primary Concern: The issue reported that
PermissionRequesthook docs did not clearly state that rewritten input and bypass-mode updates remain constrained by active permission policy.Resolution Status: RESOLVED
Recommendation: CLOSE
The current hooks reference now explicitly says that rewritten input is re-evaluated against deny and ask rules, and both the hooks reference and guide now state that
setMode: "bypassPermissions"is limited bypermissions.disableBypassPermissionsMode. The documentation now matches the requested clarification.---
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.