write_agent may block until the target background agent starts actively processing, causing new user input to queue
Chưa có ai nhận issue này.
- 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 calling write_agent to send a message to an idle background agent, the tool call appears to not return control back to the assistant's turn until the target agent has actually woken up and started actively running (processing the new message). If the user sends a new message during this window, it gets queued instead of being handled immediately — even though, from the assistant's perspective, only a single lightweight tool call was made.
Observed pattern (2 occurrences in one session):
- Assistant calls write_agent targeting an idle background agent (e.g., asking it to start a new sub-task).
- Assistant's turn appears to hang / user's next message gets queued for an extended period (not just a few seconds).
- User presses Ctrl+C to interrupt and regain control.
- Side effect: the background agent that had just been "woken up" by the write_agent call is found to be in a Cancelled state afterward (confirmed via list_agents ), even though the user did not intend to cancel that specific agent — it seems the Ctrl+C interrupt, aimed at escaping the queue, also tore down whatever background agent had just transitioned into "actively running."
This happened twice with two different background agents in the same session (both times right after a write_agent call woke an idle agent into active work).
Expected behavior:
write_agent (and any similar "dispatch to background agent" tool) should return control to the assistant's current turn immediately after the message is enqueued/delivered, without waiting for the target agent to actually begin processing — so the assistant's turn can end promptly and the user's own next input is never blocked/queued behind a background agent's execution.
Environment:
• GitHub Copilot CLI version: 1.0.70
• Platform: Linux
Additional note: This is a hypothesis based on observed correlation (not confirmed via internal logs/source), but the pattern was consistent across two independent incidents in the same session.
Affected version
No response
Steps to reproduce the behavior
No response
Expected behavior
No response
Additional context
No response
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách theo dõi việc dispatch write_agent của CLI và cách list_agents báo cáo trạng thái của target; issue không cung cấp tệp mã nguồn hoặc các bước tái hiện. Điều tra xem control có chờ quá trình xử lý bắt đầu hay không và Ctrl+C được truyền đi như thế nào, sau đó xác minh rằng dispatch trả về sau khi chuyển giao mà không hủy agent chạy nền.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- shell
- Lĩnh vực
- cli
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 38/100