claude-code - 💡(How to fix) Fix [DOCS] PermissionRequest hook docs omit deny-rule and bypass-mode policy caveats [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#48865Fetched 2026-04-16 06:48:49
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
labeled ×4
RAW_BUFFERClick to expand / collapse

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 are default, acceptEdits, dontAsk, bypassPermissions, and plan

The guide page also says:

The mode value is any permission mode like default, acceptEdits, or bypassPermissions, and destination: "session" applies it for the current session only.

The permissions docs separately say:

To prevent bypassPermissions or auto mode from being used, set permissions.disableBypassPermissionsMode or permissions.disableAutoMode to "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:

  • updatedInput is validated again against permission rules after the hook returns. Matching permissions.deny rules still block execution, and matching ask rules still prompt.
  • updatedPermissions entries of type setMode are validated against active policy settings. setMode: "bypassPermissions" should mention that it is rejected when permissions.disableBypassPermissionsMode is "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:

PageContext
https://code.claude.com/docs/en/hooksPermissionRequest reference, updatedInput, and setMode behavior
https://code.claude.com/docs/en/hooks-guideExample showing updatedPermissions with setMode
https://code.claude.com/docs/en/permissionsGeneral deny-rule precedence and disableBypassPermissionsMode policy text

Total scope: 3 pages affected

Source: Changelog v2.1.110

Exact changelog entry:

Fixed PermissionRequest hooks returning updatedInput not being re-checked against permissions.deny rules; setMode:'bypassPermissions' updates now respect disableBypassPermissionsMode

extent analysis

TL;DR

Update the PermissionRequest documentation to clarify that hook-driven updates are constrained by policy checks after the hook returns.

Guidance

  • Add a note under PermissionRequest decision control to explain that updatedInput is validated again against permission rules after the hook returns, and that matching permissions.deny rules still block execution.
  • Update the documentation for setMode: "bypassPermissions" to mention that it is rejected when permissions.disableBypassPermissionsMode is "disable".
  • Link these notes to the main permissions documentation to provide clear interaction between the pages.
  • Review the affected pages (https://code.claude.com/docs/en/hooks, https://code.claude.com/docs/en/hooks-guide, and https://code.claude.com/docs/en/permissions) to ensure consistency and accuracy.

Example

No code snippet is necessary for this issue, as it is related to documentation clarification.

Notes

The suggested improvements are based on the changelog entry for v2.1.110, which fixed the enforcement path for PermissionRequest hooks returning updatedInput and setMode: "bypassPermissions". The updates should reflect the actual behavior of the system to avoid confusion.

Recommendation

Apply the suggested improvements to the documentation to provide clear and accurate information about the PermissionRequest behavior and its interaction with permission policies. This will help users understand the feature and avoid difficulties in using it.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [DOCS] PermissionRequest hook docs omit deny-rule and bypass-mode policy caveats [1 participants]