github / github/copilot-cli

[BUG]: Terminal streaming renderer corrupts output - characters doubled/truncated during streaming

オープン
#3,749 コメント 5 件 リアクション 8 件 担当者 0 名 GitHub で見る
area:terminal-rendering
主要言語
Shell
スター
11.2k
フォーク
1.9k
平均マージ
14時間 16分
マージ済み PR(30日)
6

説明

## Description

The Copilot CLI terminal renderer corrupts streamed output, producing doubled characters, truncated tokens, and repeated lines. This affects both the thinking/reasoning phase output and the final assistant response output.

## Steps to Reproduce

1. Ask Copilot CLI any question that produces a moderately long response
2. Observe the output as it streams to the terminal

## Observed Behavior

Output is visibly corrupted during streaming. Examples seen:
- Partial tokens rendered before full token is available (e.g. `apil` instead of `apiVersion`)
- Characters doubled mid-word (e.g. `obserrvability`, `permpermissions`)
- Words repeated mid-sentence (e.g. `New ReliNew Relic`, `useruser`)
- Lines repeated (e.g. `metadata:` block appearing twice)
- Thinking/reasoning tokens streamed visibly with same corruption artifacts

Example corrupted output observed:
```
apil
apiVersion: rbac.authorization.k8s.io/v1
...
- apiGroups: [piGroups: [""]
```

## Expected Behavior

Output should render cleanly with no corruption, doubled characters, or repeated lines.

## Environment

- Copilot CLI version: 1.0.61
- OS: Darwin (macOS)

## Notes

The underlying content being generated is correct — the issue is purely in how the CLI streams and renders tokens to the terminal.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Start by reproducing the corruption in the Copilot CLI terminal renderer on macOS, comparing thinking/reasoning and final-response streaming. Trace how the renderer handles partial tokens and line updates; done means streamed output matches the underlying content without doubled characters, truncation, or repeated lines.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
shell
領域
cli
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。