Skip to content

[Windows][CLI 0.167.0][VS Code + Git Bash] Reload Window causes raw mouse-report sequences to flood Codex input across terminal tabs #60125

Closed as not planned

Description

@covenant-17

What version of Codex CLI is running?

codex-cli 0.167.0, installed using the standalone Windows installer. This matches the latest GitHub release (rust-v0.167.0) when checked on November 7, 2026.

I have observed this across the last six CLI releases I used, not just 0.167.0. The exact earlier version list and first affected release have not been recorded.

What subscription do you have?

Not disclosed in this public report.

Which model were you using?

gpt-6.1-sol, high reasoning, as shown in the recording. Model independence has not been tested; the symptom occurs in local terminal input.

What platform is your computer?

Windows 10 Pro x64, build 10.0.19045.

What terminal emulator and version are you using (if applicable)?

  • Visual Studio Code 1.145.2 x64.
  • VS Code integrated terminal, including terminals opened as editor tabs.
  • Shell: Git Bash, GNU Bash 5.2.37(1)-release (x86_64-pc-msys).
  • Git for Windows: 2.49.0.windows.1.
  • Git Bash profile arguments: --login -i.
  • Local Windows environment; this report does not concern the Codex IDE extension's chat UI.

Relevant Codex configuration at the time:

[tui]
fullscreen_transcript = true
mouse_scroll_speed = 3

Codex doctor report

codex doctor --json completed successfully. Relevant results are summarized below rather than publishing the full report, which contains unrelated local paths and session inventory.

  • Runtime: windows-x86_64, version 0.167.0, standalone installation.
  • Configuration: loaded successfully.
  • TERM_PROGRAM=vscode; terminal version 1.145.2.
  • Console input/output code pages: 65001.
  • Overall status: warning. Warnings concern unverified endpoint-protection exclusions, rollout/state inventory differences, and an HTTP 403 from the update-version probe. No causal connection to this bug has been established.

Collection limitation: doctor was invoked through an agent shell tool using redirected streams, not inside the affected interactive Git Bash TUI. Its non-TTY/console-mode fields therefore do not describe the broken interactive terminal.

What issue are you seeing?

After running VS Code's Developer: Reload Window while Codex CLI is open in integrated Git Bash terminals, the restored Codex sessions start inserting large quantities of unwanted characters into the prompt/composer.

Visible fragments repeatedly begin with [M, for example:

[MCXG[MCWG[MCWh[MCUI[MCTI[MCRJ

Mouse movement over the affected terminal is accompanied by more fragments appearing. This rapidly pollutes the draft and makes normal prompt entry difficult.

The issue affects multiple existing Codex terminal tabs after the same window reload, rather than only the selected tab. A reviewed recording shows corruption in both an existing conversation and a second Codex tab displaying its initial screen. I observe this with Codex and have not observed the same behavior in ordinary shell use.

What steps can reproduce the bug?

  1. On Windows 10, open VS Code and select Git Bash as the integrated terminal profile.
  2. Start Codex CLI with codex. For the multi-tab case, open another integrated terminal tab and start a second Codex session.
  3. Leave the Codex sessions open. They can be idle at the prompt.
  4. Press Ctrl+Shift+P and run Developer: Reload Window.
  5. Wait for VS Code to reload and restore/reconnect the terminal tabs.
  6. Focus a restored Codex terminal and move the mouse over its terminal area.
  7. Observe repeated [M... fragments being inserted into the Codex composer without intentionally typing or pasting them.
  8. Switch to the other restored Codex terminal tab and repeat the mouse movement. The same corruption occurs there.

What is the expected behavior?

Reloading the VS Code window should preserve usable Codex terminal sessions. Mouse movement, clicks, and scrolling should be processed as input events and should not insert terminal protocol fragments into the composer.

This should hold for all restored Codex terminal tabs, including inactive tabs and idle sessions.

Additional information

Evidence and verification scope

A roughly 28-second local screen recording was reviewed during preparation of this report. It shows the composer growing with repeated [M... fragments and the same symptom in a second terminal tab. The recording is not attached to this issue. Environment versions and relevant configuration were checked locally. An additional independent window-reload reproduction was not performed during report preparation.

Possible diagnostic direction, not a confirmed root cause

The visible fragments resemble classic X10/VT mouse-report sequences being interpreted as text. The reload/terminal-reconnection transition may leave the terminal and Codex input handling out of sync. Raw input bytes and console modes before/after reload have not been captured, so this is an inference, not an established cause.

Related reports

I did not find an existing report covering the specific VS Code Reload Window + Git Bash + restored terminal tabs trigger. I have not tested the workarounds from those other reports in this environment.

Activity

  1. added
    bug
    CLI
    windows-os
    TUI
    on Nov 7, 2026
  2. covenant-17 commented on Nov 7, 2026

    @covenant-17
    Author

    Screencast showing the issue after Developer: Reload Window in VS Code on Windows 10 with Git Bash and Codex CLI 0.167.0. Moving the mouse over the restored terminals inserts raw [M... sequences into the Codex input field. The recording shows the same behavior in two terminal tabs.

    Code_RWo81RiZ7n.mp4
  3. etraut-openai commented on Nov 8, 2026

    @etraut-openai
    Contributor

    (response from codex)

    I reproduced the encoding loss with the xterm.js versions shipped in VS Code 1.145.2. Terminal replay restored mouse tracking but dropped SGR mouse encoding. The same mouse movement then produced [MCXG, exactly matching the first fragment in your report.

    This is a bug in xterm.js, which is the terminal code used by VS Code. The fix is pending upstream in xterm.js #6174. You may want to report the bug to VS Code's maintainers so they know they should pick up the fix from xterm.

    For now, try running /tui, selecting Scrollback, and restarting Codex. That worked for a similar Windows report, though we haven’t verified it for this VS Code reload case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLITUIbugwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions