Steering message in `preToolUse` "ask" denial is silently dropped
- Ngôn ngữ chính
- Shell
- Star
- 11.2k
- Fork
- 1.9k
- Merge trung bình
- 14 giờ 16 phút
- Pull request đã merge (30 ngày)
- 6
Mô tả
### 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_
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện vấn đề với .github/hooks/pre-tool-use-demo.json và một yêu cầu công cụ, sau đó theo dõi cách việc từ chối preToolUse ask được xử lý. Hoàn tất khi văn bản từ chối tùy chỉnh được gửi lại cho agent dưới dạng một thông báo định hướng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- powershell
- Lĩnh vực
- cli
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 68/100