Skip to content

[Bug] CLI inputs terminal mouse escape sequences (e.g., [M#\6) when moving mouse #49126

Closed

Description

@Mht0421

What version of Codex CLI is running?

[M#\6[M#\6[M#\5[M#\3[M#\2[M#\2[M#\3[M#\2[M#\2[M#\1[M#.[M#-[M#,[M#~[M#\h-[M#\e.[M#\Z-[M#\Y-[M#\P,[M#\P+[M#\S+[M#\S*[M#\R)[M#\K([M#\J'[M#\H'[M#\G'[M#\E&[M#\B%[M#\A$[M#\A#[M#\0#[M#?"[M#>"[M#<![M#:![M#\9![M#\8![M#\7![M#-"[M#.#[M#/%[M#\1'[M#\4*[M#>1[M#?2[M#\C4[M#\D4[M#\D3[M#\D2[M#\E2[M#\F2[M#\H2[M#\I2[M#\J3[M#\P6[M#\Q0[M#\T9[M#\W:[M#\W;[M#\X;[M#\Y;[M#;][M#;][M#;_[M#;

What subscription do you have?

API

Which model were you using?

gpt-5.2

What platform is your computer?

x64

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

Windows Terminal

Codex doctor report

What issue are you seeing?

When I move my mouse or click inside the terminal window while Codex CLI is active, the tool inadvertently inputs terminal mouse reporting escape sequences into the prompt.

Examples of the garbage text include: [M#\6[M#\6[M#\5[M#\3[M#\2[M#\2[M#\3... and long strings of similar characters. It seems Codex CLI is not filtering out X10 mouse reporting sequences (ESC[M...), treating mouse movements as keyboard input. The AI then tries to interpret these sequences as user prompts, causing unexpected behavior.

What steps can reproduce the bug?

  1. Open Codex CLI in the terminal (e.g., [Windows Terminal]).
  2. Move the mouse cursor continuously over the terminal window.
  3. Observe the garbage characters being automatically injected into the text prompt.

What is the expected behavior?

No response

Additional information

No response

Activity

  1. added
    bug
    on Sep 29, 2026
  2. added
    CLI
    windows-os
    TUI
    on Sep 29, 2026
  3. InnovationReadyTupperware commented on Sep 29, 2026

    @InnovationReadyTupperware

    OpenAI team hello??? This literally makes the CLI unusable on windows.

    You're a MULTI-BILLION-DOLLAR company shipping a very popular developer tool, and somehow windows testing still seems to be an afterthought... IF IT'S EVEN BEING CONSIDERED AT ALL. How does an issue this severe make it through testing, stay broken for almost a week, and still not get treated as a top priority????

  4. bc-openai commented on Oct 2, 2026

    @bc-openai
    Contributor

    Thanks for the report! This should be fixed in 0.159.0. We hear you on Windows falling behind a bit and we will try to do better here.

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