Skip to content

IntelliJ terminal prints mouse reporting escape sequences with Codex TUI on Windows #48912

Closed

Description

@hatamisd

Summary

On Windows, Codex CLI in the IntelliJ IDEA integrated terminal prints raw mouse-reporting escape sequences such as [MC... when the mouse is moved over the terminal while Codex is running.

This regression started after upgrading from Codex CLI 0.156.1. It is still reproducible with 0.158.0.

Environment

  • OS: Windows
  • IDE: IntelliJ IDEA integrated terminal
  • Codex install: standalone Windows installer
  • Codex executable:
    C:\Users\<user>\AppData\Local\Programs\OpenAI\Codex\bin\codex.exe

Versions tested

  • codex-cli 0.156.1: works correctly
  • codex-cli 0.157.0: regression present
  • codex-cli 0.158.0: regression still present

The daemon issue seen in 0.157.0 appears to be fixed in 0.158.0, but this IntelliJ terminal mouse-reporting regression remains.

Reproduction steps

  1. Open IntelliJ IDEA on Windows.
  2. Open the integrated Terminal.
  3. Enable Mouse reporting in IntelliJ Terminal settings.
  4. Start Codex:
    codex
  5. Move the mouse pointer over the terminal.

Actual behavior

Raw mouse event/control sequences are printed into the Codex terminal output, e.g. sequences beginning with:

[MC...

The output appears only while moving the mouse over the IntelliJ terminal.

Expected behavior

Mouse-reporting sequences should be handled by the TUI/terminal and should not be rendered as visible text.

Additional observations

  • The problem is specific to the IntelliJ integrated terminal.
  • Running Codex in a normal Windows Terminal / PowerShell does not show the issue.
  • Switching IntelliJ Terminal engine to Classic does not fix it.
  • With Mouse reporting = ON, raw mouse escape sequences are printed.
  • With Mouse reporting = OFF, the escape sequences disappear, but mouse-wheel scrollback in the IntelliJ terminal no longer works.
  • Shift+PageUp / Shift+PageDown do not work as a practical scrollback workaround in this setup.
  • Downgrading to codex-cli 0.156.1 restores normal behavior.

This suggests a TUI / terminal mouse-mode regression introduced after 0.156.1 that affects JetBrains integrated terminals on Windows.

Activity

  1. added
    bug
    CLI
    windows-os
    TUI
    on Sep 28, 2026
  2. hatamisd commented on Sep 28, 2026

    @hatamisd
    Author

    This appears to be a duplicate of #48030.
    I can confirm the same behavior in IntelliJ IDEA on Windows.

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