Skip to content

Windows: TUI control sequences (ESC[?2026) leak into composer on Codex CLI 0.145.0 #35395

Description

@rushikeshGH

What version of Codex CLI is running?

codex-cli 0.145.0

Installed through WinGet:

Name      Id           Version Source
Codex CLI OpenAI.Codex 0.145.0 winget

winget upgrade --id OpenAI.Codex reports that no newer package is available. The npm latest tag is also 0.145.0.

What platform is your computer?

Windows, running Codex natively in Windows Terminal. Exact Windows build was not captured.

What terminal emulator and shell are you using?

  • Windows Terminal (exact version not captured)
  • PowerShell
  • Reproduces both with the normal PowerShell profile and after launching pwsh -NoProfile

What issue are you seeing?

Codex CLI intermittently inserts raw terminal control-sequence text into its own composer/input area during normal conversation use.

The clearest observed sequence begins with:

ESC[?2026

In the UI, the ESC byte is rendered as a visible left-arrow-like character, followed by text resembling:

←[?2026...

This appears to be the DEC private mode sequence used for synchronized output (CSI ? 2026 h/l) leaking back into the TUI input buffer instead of remaining an output-only terminal control sequence.

A second observed corruption contained text resembling a terminal-title/control sequence followed by the current directory/title (VaultMaster). Initially this was suspected to originate from the PowerShell profile, but the ESC[?2026... corruption reproduced under pwsh -NoProfile, ruling out the profile as the general cause.

Windows Terminal also played its audible bell when messages were submitted or when the affected conversation was opened. Setting Windows Terminal's Bell notification style to None silenced the sound, but did not fix the control-sequence text appearing in the composer. The sound may be associated with a BEL byte in one of the leaked control sequences, though that part is an inference.

The issue is intermittent: a fresh no-profile session initially appeared clean, but the raw ESC[?2026... text subsequently returned while the conversation was active.

Steps to reproduce

  1. Open Windows Terminal on Windows.

  2. Start PowerShell, optionally using a clean profile:

    pwsh -NoProfile
  3. Run Codex CLI 0.145.0:

    codex
  4. Open or continue a conversation and submit messages normally.

  5. Allow the assistant to respond and perform tool activity; interrupting a turn was also observed near one occurrence.

  6. Watch the composer at the bottom of the TUI.

  7. Intermittently, raw control-sequence text such as ESC[?2026... appears inside the composer.

Expected behavior

Terminal control sequences emitted by the Codex TUI should be interpreted as output control and must never be inserted into the composer/input buffer. Opening a conversation and submitting a message should not trigger an audible terminal bell unless explicitly configured as a notification.

Actual behavior

Raw ANSI/DEC control-sequence bytes are rendered and inserted as editable composer text. Windows Terminal may also play its audible bell. Disabling the audible bell only masks the sound; it does not prevent composer corruption.

Additional information

This report is distinct in that the visible leaked sequence is specifically ESC[?2026..., consistent with synchronized-output mode, on Codex CLI 0.145.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIIssues related to the Codex CLITUIIssues related to the terminal user interface: text input, menus and dialogs, and terminal displaybugSomething isn't workingwindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions