Repository navigation
Description
Summary
When a preToolUse hook rewrites a command using updatedInput with permissionDecision: allow, Copilot CLI v1.0.24 still shows an interactive confirmation dialog to the user on every rewritten command. There is currently no way for a hook to silently rewrite a command.
Environment
- Copilot CLI version:
1.0.24 - OS: Linux
Context
Consider a tool that automatically prepends a proxy prefix to dev commands (e.g. git status → proxy git status) to reduce LLM token consumption. Users install a preToolUse hook so the agent's commands are transparently rewritten without friction.
Before v1.0.24, updatedInput was not supported in Copilot CLI (#2013), so the hook used deny-with-suggestion as a workaround. When v1.0.24 shipped updatedInput support, the hook was upgraded to use updatedInput + permissionDecision: allow.
What I expected
A hook returning:
{
"hookSpecificOutput": {
"hookEventName": "PreToolUse",
"permissionDecision": "allow",
"permissionDecisionReason": "proxy auto-rewrite",
"updatedInput": {
"command": "proxy git status",
"description": "check repo status"
}
}
}should silently rewrite the command and run it — no confirmation needed, since:
- The user explicitly installed the hook (opt-in)
permissionDecisionisallow- The rewrite is mechanical (just prepending a proxy prefix)
What happened instead
Copilot CLI shows a confirmation dialog on every rewritten command:
╭─────────────────────────────────────────────────────╮
│ Hook permission request │
│ ⚠ proxy auto-rewrite │
│ │
│ Tool: bash │
│ Args: {"command": "proxy git status", ...} │
│ │
│ Do you want to allow this tool call? │
╰─────────────────────────────────────────────────────╯
This dialog appears for every single command the agent runs that gets rewritten — making the hook more disruptive than the old deny-with-suggestion workaround.
Proposed solution
Add a way for hooks to indicate a rewrite should be applied silently. Options:
Option A — permissionDecision: allow should suppress the dialog (most intuitive):
If the hook already decided
allow, no confirmation should be needed.
Option B — New field showConfirmation: false:
{
"hookSpecificOutput": {
"permissionDecision": "allow",
"updatedInput": { ... },
"showConfirmation": false
}
}Option C — New permissionDecision value "silent-allow" or "allow-silent"
Option A seems most consistent with the existing semantics — allow already means the hook approved it.
Impact
Without silent rewrite, updatedInput is not practical for high-frequency mechanical rewrites (like token optimization proxies). The old deny-with-suggestion workaround was less disruptive because denials are handled gracefully by the agent without surfacing a modal to the user.
cc @MRayermannMSFT (from #2013)
Activity
examon commentedon Apr 12, 2026
This was fixed across two releases. In v1.0.18,
permissionDecision: "allow"was updated to suppress the tool approval prompt. In v1.0.24,updatedInputsupport was added so hooks can rewrite tool arguments before execution. These features compose, so returningallowtogether withupdatedInputon v1.0.24 should rewrite the command without showing a dialog. If you are still seeing the prompt on v1.0.24, please comment with a minimal repro or sanitized hook output and we will take another look.jeziellopes commentedon Apr 13, 2026
Confirmed still happening on v1.0.24. Here's a minimal repro.
Hook config (
.github/hooks/rtk-rewrite.json){ "hooks": { "PreToolUse": [ { "type": "command", "command": "proxy-hook", "cwd": ".", "timeout": 5 } ] } }Hook input (from Copilot CLI)
{"toolName":"bash","toolArgs":"{\"command\":\"git log --oneline -3\",\"description\":\"check repo\"}"}Hook output (what the hook returns)
{ "hookSpecificOutput": { "hookEventName": "PreToolUse", "permissionDecision": "allow", "permissionDecisionReason": "proxy auto-rewrite", "updatedInput": { "command": "proxy git log --oneline -3", "description": "check repo" } } }What happened
Despite
permissionDecision: allow, Copilot CLI v1.0.24 shows this dialog:Note: the dialog shows the original args, not the rewritten
updatedInput. ThepermissionDecisionReason("proxy auto-rewrite") is shown as the dialog title, which confirms the hook output was received — but the dialog still appears.This happens on every rewritten command. A mechanical rewrite hook where the user explicitly opted in by installing the hook becomes unusable because it interrupts every single agent command.
ChristofferKarlsson commentedon Apr 14, 2026
Experiencing the same thing as @jeziellopes, and the problem is still present on 1.0.25, @examon.
specter119 commentedon Apr 15, 2026
@examon this was not fixed.
examon commentedon Apr 29, 2026
@jeziellopes Thanks for the concrete repro. I retested this with an isolated Copilot CLI v1.0.39 and a fresh config containing only the posted
PreToolUsehook. In that run,permissionDecision: "allow"plusupdatedInputrewrote the bash command to the proxy command, executed the proxy command, and did not show aHook permission requestdialog.To find the delta with the failing setup, could you please share three details from a single failing run?
PreToolUsehook? If yes, could you please share the exact launch command/config path?jqor formatting, etc.)Thanks a lot
bigfoot88 commentedon May 5, 2026
我使用copilot --yolo,运行过程中遇到rtk时总是弹出这个询问的页面。请问如何解决?
vinciest commentedon May 9, 2026
Same here with 1.0.44, every tool call gets a "Hook permission request" when using RTK even with
/yoloenabled. 😮💨asule90 commentedon May 15, 2026
same here with rtk
rtk-ai/rtk#1155 (comment)
rohitpagariya commentedon May 25, 2026
I'm running into this problem also, and I'd love to see this prioritized and fixed.
jaderocks commentedon Jun 17, 2026
So do we have solution for this?
Jonas-Tieto commentedon Jun 24, 2026
I still have this issue in v1.0.64-3 ... @CopiloTTeam can we get an updated timeline on this?
vinciest commentedon Jun 25, 2026
Reporting back, I've got this work with a custom extention and been using RTK fine with Copilot CLI for a while, you can run
rtk gain --historyto verify if it's really working.https://gist.github.com/vinciest/900d2712aad394e5c8f359e27be8ca89
patniko commentedon Oct 26, 2026
Thanks for the report. We've shipped fixes in this area since this was filed, and we believe this may now be resolved. Could you retest on the latest release (Copilot CLI v1.0.103) and let us know whether you still see it? If we don't hear back in a couple of weeks, we may close this issue — you can always reopen it.
Triaged as part of a Copilot SDK backlog review, with help from GitHub Copilot.