Steering message in `preToolUse` "ask" denial is silently dropped
Nobody has claimed this yet.
- 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
- Scaffold a basic project with
.github\hooksand 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
}
]
}
}
- Invoke
copilotinside of the scaffolded "project". - Ask the session to use any tool, e.g.
Please use your `view` tool to read `.github/hooks/pre-tool-use-demo.json`
- Deny the prompt with a steering message, such as "Please confirm you see this response"
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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