github / github/copilot-cli

Assistant text preceding a tool call is reclassified as reasoning and summarized into "Thought for Ns" (never shown to the user)

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

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

area:terminal-rendering
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 the model emits a substantial reasoning block, followed by a multi-paragraph user-facing text block, followed by a tool call in the same turn, the CLI does not display the text block. Instead, the text is folded into the collapsed "Thought for Ns" region, where it appears only as a summarized paraphrase appended to the reasoning summary. The verbatim message never appears anywhere in the transcript.

This is not specific to any one tool. In one session it happened before a bash (Shell) call and before an ask_user call. The ask_user case is where it's most damaging: the model writes its explanation, then asks a question. The user receives a bare form with no explanation, which reads as the assistant "thinking privately and then asking a terse question."

Evidence that the text is being merged into the reasoning summary, not merely hidden: expanding the "Thought for 19s" block Expanded Thought showing user-facing text summarized into reasoning shows the reasoning summary ending at …before proceeding. immediately followed with no space by Reading surfaced real issues grep missed: inline SVG octicons…, which is a compressed version of the user-facing message the model had written (a numbered findings list plus a 3-bullet proposal). The missing space is the seam where two separately-summarized chunks were concatenated.

The bug is intermittent, which has made it hard to pin down; over months it presented as "the assistant seems to think I have context I was never given." Within one session, six turns with text-before-tool-call were observed:

Reasoning before text User-facing text Tool called Text shown?
long short (2 sentences) bash
short short (1 line) bash
long (34s) medium (1 paragraph, ~4 sentences) bash ❌ folded into "Thought for 34s"
short short (1 line) bash
long (19s) long (~300 words, numbered list) ask_user ❌ folded into "Thought for 19s"
very short long (~120 words, list) ask_user

Only the two turns with both a long reasoning block and a multi-paragraph text block lost the text. Either alone rendered fine.

Also observed, secondary: the ask_user message parameter does appear in the transcript afterward ("Asked user …"), but while the form is live, only the field title and option labels are visible. So if the explanation was dropped, the user sees just e.g. "How to proceed" with three options.

Affected version

GitHub Copilot CLI 1.0.84-1

Steps to reproduce the behavior

Reproduction is probabilistic; the trigger appears to be the combination below.

  1. Start an interactive copilot session on a non-trivial task (one that makes the model reason at length, e.g. analysing a codebase and proposing a plan).
  2. Ask a question whose natural answer is: think hard → write a multi-paragraph explanation → then call a tool (e.g. "investigate X and then ask me how to proceed", or anything that ends with a shell command after an explanation).
  3. Observe the transcript: where the multi-paragraph explanation should be, there is only Thought for Ns, followed directly by the tool call (or the ask_user form).
  4. Expand the Thought for Ns block. Its final sentences are a paraphrase of the missing explanation, sometimes concatenated to the reasoning summary without a separating space.

To confirm the text existed on the model side: ask the assistant in the next turn "what exactly did you emit last turn, in order?". Tt will report a text block before the tool call that was never displayed.

Sanity check that rules out "the model just didn't write anything": in the same session, a deliberately long (~120 words, multi-paragraph, bulleted) preamble before an ask_user call did render, in a turn where the model did very little reasoning first. Same text shape, different reasoning length, different outcome.

Expected behavior

  • Every user-facing text block the model emits is displayed verbatim, regardless of what precedes or follows it in the turn.
  • Reasoning and user-facing text are never merged. The "Thought for Ns" region should only ever contain (a summary of) reasoning content.
  • When ask_user is invoked, any assistant text emitted earlier in the same turn should be visible above the form so the question has context.

Additional context

  • OS: CachyOS Linux (Arch-based), kernel: Linux
  • CPU architecture: x86_64
  • Terminal emulator: Ghostty (TERM=xterm-ghostty)
  • Shell: zsh
  • Model in the session: Claude Fable 5.1 (claude-fable-5.1); reasoning display shows summarized reasoning, not raw. claude-fable-5 also previously ran into this problem multiple times

Screenshots:

  • Transcript: assistant text missing before tool calls Transcript view. Note Thought for 34s → Shell "Baseline check…" with no assistant text between them, and Thought for 19sAsked user … with no assistant text between them, while shorter preambles in neighbouring turns ("Content moved a lot…", "You're right, and the baseline already proves it…") render normally.
  • Expanded Thought showing user-facing text summarized into reasoning Same region with the Thought for 19s block expanded. The second paragraph ends …before proceeding.Reading surfaced real issues grep missed: …, the portion after the missing space is the summarized user-facing message.

Happy to provide --log-level debug --log-file output from a reproduction if that would help; not captured for the session above.

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 tái hiện một phiên copilot tương tác với phần reasoning dài, một khối văn bản gồm nhiều đoạn và một lệnh gọi bash hoặc ask_user tiếp theo. Theo dõi việc kết xuất bản ghi xung quanh vùng thu gọn "Thought for Ns" và cách xử lý các lệnh gọi công cụ. Được xem là hoàn tất khi mọi khối hiển thị cho người dùng đều xuất hiện nguyên văn trước lệnh gọi công cụ, reasoning vẫn tách biệt và ask_user hiển thị phần giải thích trước đó.

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.