github / github/copilot-cli

Wrapped links leak OSC 8 escape markup in Ghostty

オープン
#4,356 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

triage
主要言語
Shell
スター
11.2k
フォーク
1.9k
平均マージ
14時間 16分
マージ済み PR(30日)
6

説明

Describe the bug

Long links in assistant Markdown sometimes render with the OSC 8 hyperlink control payload visible as text when the link wraps in Ghostty. The output is prefixed with text resembling:

]8;;id=md-<generated-id>;https://example.com/a/very/long/path/https://example.com/a/very/long/path/

The saved assistant response contains only a valid plain URL, with no malformed Markdown or escape sequences. This indicates the corruption occurs in Copilot CLI's terminal rendering rather than in model output.

This appears related to the 1.0.68 changelog fix, "Preserve wrapped OSC 8 hyperlink IDs in terminal output," but still reproduces on 1.0.78.

Affected version
GitHub Copilot CLI 1.0.78
Steps to reproduce the behavior
  1. Launch Copilot CLI in Ghostty.
  2. Have an assistant response end with a bare URL long enough to wrap at the current terminal width.
  3. Observe that the URL is preceded by visible OSC 8 payload text such as ]8;;id=md-...; and may appear duplicated.

An affected session is:

250a0930-cde5-4f39-bcdd-c40ef05656a0

The problem is visible in the final assistant response of that session.

Expected behavior

The response should display one clean, clickable URL. OSC 8 control sequences and generated hyperlink IDs must never be visible, including when the URL wraps across terminal lines.

Additional context
  • Operating system: macOS (Darwin), Apple Silicon
  • Terminal: Ghostty 1.3.2-main-+8252871b2
  • Environment: TERM_PROGRAM=ghostty, TERM=xterm-ghostty, COLORTERM=truecolor
  • Workaround: launching with FORCE_HYPERLINK=0 copilot prevents OSC 8 hyperlinks from being emitted
  • The local session event log records the assistant content as normal prose followed by a plain URL, confirming the malformed text is introduced during rendering
  • Screenshot exists locally but was not attached because gh issue create does not support uploading issue-form attachments

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

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

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

折り返される長いプレーン URL を使って Ghostty で Copilot CLI 1.0.78 を実行し、セッション 250a0930-cde5-4f39-bcdd-c40ef05656a0 をコンテキストとして使用して問題を再現します。セッションイベントログ内のプレーン URL とターミナル出力を比較し、OSC 8 のレンダリングパスを追跡します。折り返されたリンクが、表示可能な制御ペイロードや重複したテキストなしに、1 つの正常なクリック可能 URL として表示されれば完了です。

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

評価

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

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

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