github / github/copilot-cli

Wrapped links leak OSC 8 escape markup in Ghostty

Offen
#4,356 0 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

triage
Vorherrschende Sprache
Shell
Sterne
11.2k
Forks
1.9k
Ø Merge
14 Std. 16 Min.
Gemergte PRs (30 T.)
6

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Reproduzieren Sie das Problem, indem Sie Copilot CLI 1.0.78 in Ghostty mit einer langen reinen URL ausführen, die umgebrochen wird, und verwenden Sie die Sitzung 250a0930-cde5-4f39-bcdd-c40ef05656a0 als Kontext. Vergleichen Sie die reine URL im Sitzungsereignisprotokoll mit der Terminalausgabe und verfolgen Sie den OSC 8-Renderingpfad; abgeschlossen ist die Aufgabe, wenn umgebrochene Links als eine einzige saubere anklickbare URL ohne sichtbare Steuerdaten oder doppelten Text angezeigt werden.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Bereich
cli
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
48/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.