Steering message in `preToolUse` "ask" denial is silently dropped
クローズ
まだ誰も着手していません。
area:permissions
- 主要言語
- Shell
- スター
- 11.2k
- フォーク
- 1.9k
- 平均マージ
- 14時間 16分
- マージ済み PR(30日)
- 6
説明
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
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
.github/hooks/pre-tool-use-demo.json とツールリクエストを使って問題を再現することから始め、preToolUse ask の拒否がどのように処理されるかを追跡します。カスタム拒否テキストがステアリングメッセージとしてエージェントに返されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- powershell
- 領域
- cli
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 静か
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 68/100