Skip to content

Terminal/tab title degrades to a bare ";" after a while in a session (SecureCRT) #4121

Description

@azat-badretdin

Environment

  • GitHub Copilot CLI version: 1.0.70 (native binary, @github/copilot-linux-x64)
  • Installed via: npm install -g @github/copilot
  • OS: Linux (server), accessed interactively through a SecureCRT SSH session (Windows client)
  • Shell: bash

Summary

When starting a copilot session, the SecureCRT window title and tab label are
correctly set to "GitHub Copilot". At some point later in the same session
(observed while the CLI was in a "Working - plan" state, showing session
stats like "AIC used" and the active model name), the title degrades to a
single bare ; character — both in the OS-level window title bar and in the
SecureCRT tab label. It stays as ; afterward instead of showing anything
meaningful about the session.

This started happening recently — it was not observed before, and lines up
with upgrading from CLI v1.0.69 to v1.0.70 (released 2026-07-07 and
2026-07-10 respectively); a v1.0.71 pre-release was also published the same
day as v1.0.70. I have not confirmed which exact version introduced the
regression, but it is new behavior within roughly the last few days.

Screenshots

  1. Just after starting a session — title correctly shows "GitHub Copilot":
    (attach just-started-session.png)
  2. Later in the same session (in "Working - plan" state) — title has
    degraded to a bare ;:
    (attach eventual-state.png)

(Both screenshots are available locally; please attach them to this issue
when filing — image upload requires interactive drag-and-drop or the
GitHub web UI.)

Investigation done so far

I don't have access to the CLI's source (the npm package ships only a
compiled native binary per platform, invoked via npm-loader.js), so I
investigated empirically:

  1. Captured the raw bytes written to the terminal by copilot v1.0.70 via a
    PTY harness that also answers the CLI's startup terminal-capability
    handshake (OSC 10/11 fg/bg color queries, OSC 4 palette queries, DECRQM
    reports for modes 2026/12, and the CSI ?996n dark/light-mode query).
  2. Confirmed the startup title write is a single, well-formed OSC 0 sequence:
    ESC ] 0 ; GitHub Copilot BEL — clean and correctly terminated. This
    matches screenshot 1 exactly.
  3. Found (via this user's own ~/.copilot/logs/process-*.log files across
    many past sessions) that the CLI has an automatic session-naming feature
    that logs an INFO Session named: "<short descriptive title>" line,
    firing once per session roughly 30–90 seconds into the first substantive
    turn. This is almost certainly the mechanism that pushes a second title
    update to the terminal after the initial static "GitHub Copilot" — and is
    the most likely place where the corruption originates.
  4. Was not able to capture the corrupted OSC payload live/byte-for-byte
    within the time available in a scripted reproduction (the scripted nested
    session did not reach the auto-naming point quickly enough in the test
    sandbox), so this report is based on strong circumstantial evidence
    rather than a captured raw byte dump of the bad sequence.

Root-cause hypothesis

The bare ; is much more consistent with a client-side (CLI) title-string
formatting bug than with a terminal-emulator-side (SecureCRT) parsing/
truncation problem:

  • A torn/truncated OSC escape sequence reaching a terminal typically either
    (a) fails to parse as a title update at all, and is instead printed as
    literal garbage into the terminal grid (not the title bar), or (b) is
    ignored, leaving the previous valid title in place. Neither matches what's
    observed — the title bar is cleanly replaced by a single punctuation
    character.
  • A single bare ; is exactly what you'd get from a title-string builder
    that joins multiple segments (e.g. an icon/status segment and a
    session-name segment) with ";" as a separator, in a case where both
    segments evaluate to an empty string (e.g., while in "Working"/plan-mode
    status, or if the generated session name isn't available yet at the moment
    of the title write).

Suggested fix direction

Filter out empty/falsy segments before joining them with ; (or whatever
separator is used) when composing the dynamic terminal title, so a title
update never results in just the bare separator character.

Steps to reproduce (best effort — timing-dependent)

  1. Start copilot in an interactive terminal that supports OSC 0/2 title
    sequences (e.g. SecureCRT with "allow remote title changes" or similar
    enabled).
  2. Confirm the window/tab title shows "GitHub Copilot".
  3. Send a normal chat message and let the session run for a minute or two,
    into a "Working"/plan-mode state, long enough for the automatic
    session-naming feature to trigger.
  4. Observe the window/tab title — in the reported case it degrades to a bare
    ; instead of showing the auto-generated session name.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:terminal-renderingDisplay and rendering: flickering, scrolling, line wrapping, output formatting

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions