Windows: TUI control sequences (ESC[?2026) leak into composer on Codex CLI 0.145.0
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Reproduce the leak in Codex CLI 0.145.0 using Windows Terminal and pwsh -NoProfile, then trace the TUI composer input path and terminal control-sequence handling. Compare the behavior with related reports #24929 and #12542; done means sequences such as ESC[?2026... no longer appear as editable composer text, with Windows coverage where possible.
Written by the indexing model from the issue text.
Description
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
-
Open Windows Terminal on Windows.
-
Start PowerShell, optionally using a clean profile:
pwsh -NoProfile -
Run Codex CLI 0.145.0:
codex -
Open or continue a conversation and submit messages normally.
-
Allow the assistant to respond and perform tool activity; interrupting a turn was also observed near one occurrence.
-
Watch the composer at the bottom of the TUI.
-
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
- Reproduces on the current stable release (
0.145.0) distributed through WinGet. - The same version is currently published under npm's
latesttag. pwsh -NoProfiledoes not resolve it, so a PowerShell profile or prompt theme is not required for reproduction.- No project code is involved; this occurs in the Codex TUI itself.
- Related reports with other raw-input/control-sequence symptoms:
- #24929 — Windows Terminal focus event sequences
[O/[Iinserted into the prompt - #12542 — Windows Terminal TUI regression with raw ANSI sequences and broken input
- #24929 — Windows Terminal focus event sequences
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.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- Avg merge
- 1m
- Merged PRs (30d)
- 1k
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openai/codex
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug CLI windows-os
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
macOS sandbox blocks hw.optional.arm64 sysctl, causing Flutter to misdetect Apple Silicon as x64 Openbug CLI sandbox
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug CLI TUI
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
CLI config enhancement skills
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
A-linter
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
oxc-project/oxc#26863 ·