Input box pre-filled with DA1 device-attributes reply ( [?61;6;7;…c ) on startup under native-Windows zellij
まだ誰も着手していません。
- 主要言語
- Shell
- スター
- 11.2k
- フォーク
- 1.9k
- 平均マージ
- 14時間 16分
- マージ済み PR(30日)
- 6
説明
Describe the bug
Describe the bug
When launching Copilot CLI inside a native-Windows zellij session, the input box is pre-filled on startup with a raw terminal escape sequence:
[?61;6;7;22;23;24;28;32;42c
This is a Primary Device Attributes (DA1) reply — the response to a ESC [ c capability query. It's meant to be consumed silently, but instead the raw bytes land in the prompt as if typed. I have to clear the box (Ctrl+U) before every session.
This looks like the same class of bug as the already-fixed #36 ("Input box always filled with escape sequence ]11;rgb:… on start"), which niik traced to Copilot querying the host terminal at startup (there: OSC 11 background color). That fix (0.0.355) evidently didn't cover the DA1 ( ESC[c ) query path.
Affected version
Copilot CLI 1.0.75 (win32-x64)
Steps to reproduce
- On Windows 11, open Windows Terminal.
- Start a native-Windows zellij session ( zellij ).
- Inside a zellij pane, launch copilot .
- Observe the input box pre-filled with
[?61;6;7;22;23;24;28;32;42c.
Expected behavior
The DA1 reply is consumed by Copilot CLI; the input box starts empty.
Environment
• Copilot CLI: 1.0.75 (win32-x64)
• OS: Windows 11 Enterprise, build 26200
• Terminal emulator: Windows Terminal 1.18.10301.0
• Multiplexer: zellij 0.44.3 (native Windows — no WSL), which added a "host query forwarding" system in 0.44.x that relays capability queries between the inner app and the host terminal. The DA1 reply appears to arrive after Copilot has stopped reading, so it leaks into the input buffer.
• TERM : (unset on native Windows)
• Process chain: zellij → pwsh → copilot
Additional context
• Does not occur when running copilot directly in Windows Terminal (no zellij) — pointing to a timing/consume issue on the query-response path when a multiplexer sits in between.
• Decoded sequence: ESC [ ? 61 ; 6 ; 7 ; 22 ; 23 ; 24 ; 28 ; 32 ; 42 c = DA1 reply, VT conformance level 61 + advertised feature codes.
• Related prior fix: #36 (OSC 11 reply on start, fixed in 0.0.355).
Affected version
No response
Steps to reproduce the behavior
No response
Expected behavior
No response
Additional context
No response
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
Copilot CLI の起動時における terminal-query と input-buffer の処理から始め、DA1 の応答経路を issue #36 の以前の OSC 11 修正と比較します。ネイティブな Windows 上で zellij 0.44.3 を使って再現し、その後、応答がいつ到着するかを追跡し、Windows Terminal の直接使用時の動作を変更せずに prompt が空のままであることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- powershell, shell
- 領域
- cli, operating-systems, tooling
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 48/100