Skip to content

BUG: PreToolUse hook 'ask' with permissionOverrides ignores the override and prompts anyway #1059

Open

Description

@Y-T-G

Bug description
When a PreToolUse hook returns decision: "ask" with a valid permissionOverrides array, the CLI completely ignores the override and prompts the user anyway.

Steps to reproduce

  1. Create a PreToolUse hook for run_command.
  2. Return a JSON response asking for permission with an exact override:
{
  "decision": "ask",
  "reason": "Safe command",
  "permissionOverrides": ["command(ls -la)"]
}
  1. Run ls -la through the tool.

Expected behavior
The CLI should consume the permissionOverrides array, auto-approve the tool execution, and silently continue without prompting the user.

Actual behavior
The CLI ignores the permissionOverrides array entirely and renders the standard Approve/Deny UI prompt.

Environment

Component Details
OS macOS
Shell zsh
Tool run_command

Additional context
Returning decision: "allow" also fails to bypass the prompt for uncached commands, leaving no programmatic way to auto-approve commands without the --dangerously-skip-permissions flag.

Activity

  1. changed the title [-]BUG: PreToolUse hook 'ask' with permissionOverrides hangs indefinitely[/-] [+]BUG: PreToolUse hook 'ask' with permissionOverrides ignores the override and prompts anyway[/+] on Sep 19, 2026
  2. chandrashakherkamasani commented on Sep 21, 2026

    @chandrashakherkamasani
    Collaborator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

duplicateThis issue or pull request already exists

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions