[DOCS] PermissionRequest hook docs omit deny-rule and bypass-mode policy caveats

Status Fixed / completed
Maintainer reply None cached
Activity 3 comments · opened Apr 16, 2026 · closed Apr 29, 2026

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:

| 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:

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

View original on GitHub ↗

3 Comments

edwluo · 6 months ago

Strong +1 from the hook API integration side. The contract gap this docs issue points out has a concrete runtime manifestation:

PermissionRequest hook responses that return behavior: "allow" combined with updatedPermissions: [{type: "setMode", mode: "bypassPermissions", destination: "session"}] have the setMode silently dropped in 2.1.110, 2.1.111, and 2.1.112. The behavior: allow half is honored (the current tool call proceeds) but the mode switch never takes effect, and the hook receives no error feedback. Other setMode values 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 disableBypassPermissionsMode is set in any scope here.

Filed as a separate runtime bug with a product-agnostic minimal repro: #49525. Happy to keep both threads aligned.

coygeek · 5 months ago

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 PermissionRequest hook documentation described updatedInput rewrites and setMode: "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 PermissionRequest reference now states that updatedInput is re-evaluated against deny and ask rules

Status: 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 PermissionRequest does not bypass matching deny rules and that rewritten input is re-checked against deny and ask rules.

---

Claim 2: The PermissionRequest reference now states that setMode: "bypassPermissions" is constrained by active policy

Status: RESOLVED

At https://code.claude.com/docs/en/hooks, line 1304: "setMode | mode, destination | Changes the permission mode. Valid modes are default, acceptEdits, dontAsk, bypassPermissions, and plan". At https://code.claude.com/docs/en/hooks, line 1309: "setMode with bypassPermissions only takes effect if the session was launched with bypass mode already available... and the mode is not disabled by permissions.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 updatedPermissions array with a setMode entry." At https://code.claude.com/docs/en/hooks-guide, line 403: "bypassPermissions only applies if the session was launched with bypass mode already available... and not disabled by permissions.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 setting permissions.disableBypassPermissionsMode to \"disable\"" and "To prevent bypassPermissions or auto mode from being used, set permissions.disableBypassPermissionsMode or permissions.disableAutoMode to \"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 |
|-------|--------|
| updatedInput is documented as being re-evaluated against deny and ask rules | RESOLVED |
| setMode: "bypassPermissions" is documented as subject to disableBypassPermissionsMode | RESOLVED |
| The guide mirrors the bypass-mode policy caveat and links to permissions docs | RESOLVED |

---

Suggested Fix

N/A - issue has been resolved.

---

References

  • URL: https://code.claude.com/docs/en/hooks
  • Lines 1275-1276: PermissionRequest decision control now says deny and ask rules are still evaluated and that modified input is re-evaluated against deny and ask rules.
  • URL: https://code.claude.com/docs/en/hooks
  • Lines 1304-1309: Permission update entries now says setMode can target bypassPermissions only when that mode is available and not disabled by permissions.disableBypassPermissionsMode.
  • URL: https://code.claude.com/docs/en/permissions
  • Lines 45-48: The permissions page states that administrators can disable bypass mode and that permissions.disableBypassPermissionsMode can be set in any settings file.

---

Conclusion & Recommendation

Primary Concern: The issue reported that PermissionRequest hook 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 by permissions.disableBypassPermissionsMode. The documentation now matches the requested clarification.

---

github-actions[bot] · 5 months ago

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.