Managed-settings policy key to suppress session-scoped bulk permission grants
managed-settings.json already supports allowManagedPermissionRulesOnly, which suppresses the persistent "Yes, and don't ask again" affordance across every permission dialog variant. There is no equivalent for the session-scoped row.
File-edit prompts still offer "Yes, allow all edits in <dir>/ during this session", bound to shift+tab. On accept it installs {type:"setMode", mode:"acceptEdits", destination:"session"}, plus {type:"addDirectories", destination:"session"} when the path is outside the working set — a bulk grant covering all subsequent edits in scope for the rest of the session.
In v2.1.222 the option is constructed unconditionally. The builder pushes a session option on every render with no configuration, policy, or feature gate consulted, and its signature — {filePath, toolPermissionContext, operationType, onRejectFeedbackChange, onAcceptFeedbackChange, yesInputMode, noInputMode} — exposes no suppression parameter. toolPermissionContext only selects which label renders, never whether it renders.
The permissions schema accepts allow, deny, ask, defaultMode, disableBypassPermissionsMode, additionalDirectories, and autoMode extras. Notably disableBypassPermissionsMode: "disable" exists — so an operator can disable bypass mode and suppress persistent grants, yet still cannot suppress this one. Hooks don't close the gap either: PermissionRequest / PreToolUse can pre-resolve a request so no dialog renders, but nothing in hook output constrains which rows appear in a dialog that does render.
Request
A managed-settings key — e.g. permissions.disableSessionScopedGrants: "disable", or extending disableBypassPermissionsMode to cover acceptEdits — that suppresses the session-accept option the way allowManagedPermissionRulesOnly suppresses the persistent one.
Rationale
For operators whose policy is that no single keystroke may grant authority beyond the call in front of the user, the current state leaves a gap reachable only by unbinding a hotkey in keybindings.json — which is machine-local, does not remove the option (it stays arrow-key selectable), and is not centrally enforceable.
Workaround in use
Explicit content-scoped ask rules on protected paths. Verified to fire under an active session grant, since content-scoped ask rules are evaluated after the tool's permission check and return ask even when it returned allow. This protects an enumerated list of paths, not the general case.
Environment
- Claude Code v2.1.222
- macOS (darwin arm64)
managed-settings.jsonat/Library/Application Support/ClaudeCode/