Steering message in `preToolUse` "ask" denial is silently dropped
- 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.
### 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**
```json
{
"version": 1,
"hooks": {
"preToolUse": [
{
"type": "command",
"powershell": "'{\"permissionDecision\":\"ask\",\"permissionDecisionReason\":\"preToolUse Demo: Allow the agent to use a tool?\"}'",
"cwd": ".",
"timeoutSec": 10
}
]
}
}
```
2. Invoke `copilot` inside of the scaffolded "project".
3. Ask the session to use any tool, e.g.
```md
Please use your `view` tool to read `.github/hooks/pre-tool-use-demo.json`
```
4. Deny the prompt with a steering message, such as "Please confirm you see this response"
5. 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
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