`agentStop` triggering on subagent turns causing `/review` to never finish/return
- 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
I have a custom hook registered to `agentStop` that instructs the agent to improve instructions files based on the work it did and issues it ran into (if instructions were out-of-date) [digivolution](https://github.com/scaryrawr/scarypilot/tree/main/plugins/digivolution).
This is intended to only be ran by the main agent, which [hook events](https://docs.github.com/en/copilot/reference/hooks-reference#hook-events) mentions the `agentStop` fires when:
> The main agent finishes a turn.
When running subagents lately, I see that `/review` never succeeds because the subagent is running main agent stop hooks:


Since the stop hook can trigger the agent to keep working, it ends up the subagent never submits the review response, even though it finished the stop hook condition as well.
### Affected version
GitHub Copilot CLI 1.0.64-3
### Steps to reproduce the behavior
1. Register a `stopAgent` hook that can block the agent turn from ending
2. Do a `/review` in a codebase where it uses subagents
### Expected behavior
The subagent should not run the `stopAgent` hook since there is a separate `subagentStop` hook and `stopAgent` is documented as not being used for subagents.
The actual behavior is that `stopAgent` is also picked up by subagents and ran.
### Additional context
_No response_
Hướng dẫn đóng góp
Hướng nghiên cứu
Start by reproducing `/review` with a blocking `stopAgent` hook on GitHub Copilot CLI 1.0.64-3, then compare the documented `agentStop` and separate `subagentStop` behavior. Trace hook handling during subagent turns; done means subagents no longer run `stopAgent`, while the main agent still does and `/review` returns.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- github, shell
- Lĩnh vực
- cli, tooling
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Sôi nổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 68/100