github / github/copilot-cli

Steering message in `preToolUse` "ask" denial is silently dropped

Closed
#4,237 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area:permissions
Dominant language
Shell
Stars
11.2k
Forks
1.9k
Avg merge
14h 16m
Merged PRs (30d)
6

Description

Describe the bug

When preToolUse returns permissionDecision: 'ask'. the CLI shows a specialized permission prompt for the tool that includes any rationale the hook returned, along with a confirm/deny prompt.

The deny prompt allows custom text, similar to the standard permissionRequest prompt.

However, this custom text does not make it back to the session, so no steering is possible.

Image Image
Affected version

1.0.74-4

Steps to reproduce the behavior
  1. Scaffold a basic project with .github\hooks and one file:

.github\hooks\pre-tool-use-demo.json

{
  "version": 1,
  "hooks": {
    "preToolUse": [
      {
        "type": "command",
        "powershell": "'{\"permissionDecision\":\"ask\",\"permissionDecisionReason\":\"preToolUse Demo: Allow the agent to use a tool?\"}'",
        "cwd": ".",
        "timeoutSec": 10
      }
    ]
  }
}
  1. Invoke copilot inside of the scaffolded "project".
  2. Ask the session to use any tool, e.g.
Please use your `view` tool to read `.github/hooks/pre-tool-use-demo.json`
  1. Deny the prompt with a steering message, such as "Please confirm you see this response"
  2. Observe that the custom steering message is not passed to the agent
Expected behavior

The steering message should be passed to the agent, allowing correcting behavior via HITL.

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with .github/hooks/pre-tool-use-demo.json and a tool request, then trace how the preToolUse ask denial is handled. Done means the custom denial text is passed back to the agent as a steering message.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.