Describe the bug
When a PreToolUse hook returns permissionDecision: "ask", the CLI shows the hook's custom permission dialog and then the native trust prompt for the same tool call. Selecting Yes on the hook's dialog should authorize the call, but instead it just advances to a second prompt, so every gated command requires two confirmations.
Selecting No on the hook's dialog correctly cancels the call with no native prompt. The double-prompt only manifests on the approval path.
Affected version
1.0.40-0
Steps to reproduce the behavior
- Create a folder (e.g. repro-plugin/) with these files:.claude-plugin/plugin.json { "name":
"ask-double-prompt-repro", "version": "0.1.0" }
hooks/hooks.json {
"hooks": {
"PreToolUse": [{
"hooks": [{
"type": "command",
"command": "bash "${CLAUDE_PLUGIN_ROOT}/hooks/scripts/gate.sh"",
"powershell": "pwsh -NoProfile -ExecutionPolicy Bypass -File
"${CLAUDE_PLUGIN_ROOT}/hooks/scripts/gate.ps1"",
"timeout": 10
}]
}]
}
}
hooks/scripts/gate.ps1 $payload = [Console]::In.ReadToEnd()
$obj = $payload | ConvertFrom-Json
$cmd = [string]$obj.tool_input.command
if ($obj.tool_name -eq "powershell" -and $cmd -match "\bgit\s+push\b") {
Write-Output
'{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"ask","permissionDecisionReason":"REPRO:
confirm push"}}'
}
exit 0
2. Start Copilot with the plugin loaded: copilot --plugin-dir
3. In the session, prompt: Run exactly this bash command and only this command, do not modify it: git push origin master
4. Select Yes on the first dialog that appears.
Result: Two sequential dialogs appear for the same tool call:
- Hook permission request, shows permissionDecisionReason "REPRO: confirm push", with options Yes / No
- Native trust prompt, with options Yes / Yes-and-don't-ask-again / No
Expected behavior
A single confirmation per gated tool call. The hook's ask dialog should replace the native trust prompt, not precede
it. Selecting Yes on the hook's dialog should authorize the call and run it immediately.
Additional context
No response
Describe the bug
When a PreToolUse hook returns permissionDecision: "ask", the CLI shows the hook's custom permission dialog and then the native trust prompt for the same tool call. Selecting Yes on the hook's dialog should authorize the call, but instead it just advances to a second prompt, so every gated command requires two confirmations.
Selecting No on the hook's dialog correctly cancels the call with no native prompt. The double-prompt only manifests on the approval path.
Affected version
1.0.40-0
Steps to reproduce the behavior
"ask-double-prompt-repro", "version": "0.1.0" }
hooks/hooks.json {
"hooks": {
"PreToolUse": [{
"hooks": [{
"type": "command",
"command": "bash "${CLAUDE_PLUGIN_ROOT}/hooks/scripts/gate.sh"",
"powershell": "pwsh -NoProfile -ExecutionPolicy Bypass -File
"${CLAUDE_PLUGIN_ROOT}/hooks/scripts/gate.ps1"",
"timeout": 10
}]
}]
}
}
hooks/scripts/gate.ps1 $payload = [Console]::In.ReadToEnd()
$obj = $payload | ConvertFrom-Json
$cmd = [string]$obj.tool_input.command
if ($obj.tool_name -eq "powershell" -and $cmd -match "\bgit\s+push\b") {
Write-Output
'{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"ask","permissionDecisionReason":"REPRO:
confirm push"}}'
}
exit 0
2. Start Copilot with the plugin loaded: copilot --plugin-dir
3. In the session, prompt: Run exactly this bash command and only this command, do not modify it: git push origin master
4. Select Yes on the first dialog that appears.
Result: Two sequential dialogs appear for the same tool call:
Expected behavior
A single confirmation per gated tool call. The hook's ask dialog should replace the native trust prompt, not precede
it. Selecting Yes on the hook's dialog should authorize the call and run it immediately.
Additional context
No response