github / github/copilot-cli

Parent's text-only final message not rendered when a background subagent's turn boundary lands inside the parent turn (1.0.84-8)

Đang mở
#4,856 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

triage
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ả

Summary

In interactive mode, a text-only final assistant message (no tool calls, no reasoning block) was emitted by the model, persisted to the session's events.jsonl and to the session-history store, and never painted in the terminal. The user saw the turn end with no response and asked again. The message is fully present in ~/.copilot/session-state/<id>/events.jsonl as assistant.message with content (1,768 chars), toolRequests: [], rte: true.

What is unusual about the turn: a background subagent (started earlier via task in background mode) was mid-flight, and its assistant.turn_end / assistant.turn_start events fired inside the parent's turn, immediately before the parent's final message. Those subagent turn-boundary events carry no parentToolCallId, so from the event stream they are indistinguishable from the parent's own turn boundaries. The parent's final message was on the parent's turnId (10); the UI had just seen turn_start for the subagent's turnId (70).

This looks related to but distinct from #4735 / #4450 (text before a tool call folded into "Thought for…") — here there was no tool call and no reasoning; the message was the entire turn. It is also distinct from #4533 (full UI freeze) — the UI kept working; only this one message was lost.

Version

GitHub Copilot CLI 1.0.84-8 (auto-updated; ~/.copilot/pkg/darwin-arm64/ holds 1.0.84-4 … 1.0.84-8), macOS arm64, Ghostty, model claude-fable-5.1, background subagent model gpt-5.5.

Event sequence (from events.jsonl, hook events omitted)

idx   | time         | type                        | parentToolCallId | turnId | content-len
23315 | 17:13:55.160 | user.message                | -                | 10     | 95
23318 | 17:13:57.104 | tool.execution_complete     | toolu_01Va…      | 68     | -      <- background subagent
23319 | 17:13:57.274 | assistant.turn_end          | -                | 68     | -      <- subagent turn, NO parentToolCallId
23320 | 17:13:57.277 | assistant.turn_start        | -                | 69     | -      <- subagent turn, NO parentToolCallId
23322 | 17:13:59.512 | model.model_call_success    | -                |        |        <- parent's model call
23327 | 17:14:00.901 | assistant.message           | toolu_01Va…      | 69     | 0      <- subagent (encryptedContent only)
23332 | 17:14:02.952 | assistant.turn_end          | -                | 69     | -
23333 | 17:14:02.952 | assistant.turn_start        | -                | 70     | -
23334 | 17:14:06.708 | assistant.message           | toolu_01Va…      | 70     | 0
23338 | 17:14:52.206 | assistant.message           | -                | 10     | 1768   <- PARENT's final text; never rendered
23339 | 17:14:52.223 | assistant.turn_end          | -                | 10     | -

Other text-only final messages earlier in the same session, with subagent turns also interleaved, did render — so this is order/timing-sensitive, consistent with the timeline tracking "current turn" from the most recent assistant.turn_start and discarding a message whose turnId doesn't match.

Expected

A parent assistant.message with content and no tool requests renders as a chat message regardless of subagent turn-boundary events interleaved in the stream. Subagent assistant.turn_start/turn_end events should carry parentToolCallId (as the subagent's assistant.message and tool.execution_* events already do), so the timeline can scope them.

Impact

The user asked the same question three times because the answer was never shown; the assistant, reading its own persisted history, believed it had answered. This is a trust problem: the transcript and the screen disagree.

Reproduction (probabilistic)

  1. Start a long-running background task (any model).
  2. While it runs, ask the parent a question whose answer is a text-only reply (no tool calls).
  3. Repeat until the parent's reply lands within ~1s after a subagent turn boundary. In my session it hit on the third text-only reply during an active background agent.

Happy to share the sanitized events.jsonl slice privately.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. 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 kiểm tra việc xử lý sự kiện xung quanh chuỗi events.jsonl đã tái hiện và kho session-history, tập trung vào cách lượt hiện tại được theo dõi qua các ranh giới của background-subagent. Tái hiện trường hợp phụ thuộc vào thời điểm với một background task và một text-only parent reply. Hoàn tất khi assistant.message của parent được render trong khi các ranh giới lượt của subagent vẫn được giới hạn đúng phạm vi.

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
Sôi nổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.