Steering message in `preToolUse` "ask" denial is silently dropped
- Langage dominant
- Shell
- Étoiles
- 11.2k
- Forks
- 1.9k
- Merge moyen
- 14 h 16 min
- PR mergées (30 j)
- 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_
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par reproduire le problème avec .github/hooks/pre-tool-use-demo.json et une requête d’outil, puis suivez la manière dont le refus de preToolUse ask est géré. C’est terminé lorsque le texte de refus personnalisé est renvoyé à l’agent sous forme de message de pilotage.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- powershell
- Domaine
- cli
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- Calme
- Clarté
- Clairement spécifiée
- Accessibilité débutants
- 68/100