Repository navigation
Description
What version of the Codex App are you using (From “About Codex” dialog)?
Codex CLI 0.161.0 (not Codex Desktop App)
What subscription do you have?
ChatGPT Plus
What platform is your computer?
Microsoft Windows NT 10.0.19045.0
What issue are you seeing?
Bug Description
When using Codex CLI 0.161.0 inside the integrated terminal of a JetBrains IDE on Windows, moving the mouse cursor causes a large number of garbled characters to appear automatically in the terminal.
This happens without typing or pasting anything. The issue makes the terminal difficult to use and interferes with normal interaction with Codex CLI.
The unexpected characters appear to resemble raw terminal mouse-event escape sequences that are not being handled correctly.
Environment
- Application: Codex CLI
- Version: 0.161.0
- Operating System: Windows
- Terminal: JetBrains IDE integrated terminal
- Installation method: Not specified
Steps to Reproduce
- Open a JetBrains IDE on Windows.
- Open the IDE's integrated terminal.
- Launch Codex CLI by running
codex. - Move the mouse cursor over the terminal area.
- Observe that large amounts of garbled text appear automatically in the terminal, even without keyboard input.
Expected Behavior
Moving the mouse cursor within the integrated terminal should not generate unexpected characters or interfere with Codex CLI input.
The terminal should only display user input and normal Codex CLI output.
Actual Behavior
Simply moving the mouse cursor causes the terminal to display a continuous stream of garbled characters.
The issue makes it difficult to interact with Codex CLI normally.
Additional Information
- The issue occurs while using Codex CLI 0.161.0 inside a JetBrains IDE integrated terminal on Windows.
- The behavior appears related to terminal mouse-event handling or escape-sequence processing.
- Similar issues have previously been reported in the OpenAI Codex repository, including [Windows][JetBrains Rider] Codex CLI 0.157.0 prints raw [M... mouse-reporting sequences in integrated terminal #48030 and Spawns many console windows on mouse movement in JetBrains Rider #48539.
- I am attaching a screenshot showing the garbled characters.
Could the Codex team investigate whether this issue is still present in version 0.161.0 and whether it is related to mouse-event handling in JetBrains terminals?
Thank you!
What steps can reproduce the bug?
- Open a JetBrains IDE on Windows.
- Open the integrated terminal inside the IDE.
- Run
codexto launch Codex CLI 0.161.0. - Wait for the Codex CLI interface to load.
- Move the mouse cursor around the terminal window, especially over the Codex input area.
- Observe that large amounts of garbled characters are automatically inserted into the terminal without any keyboard input.
Reproducibility: The issue occurs repeatedly when moving the mouse within the terminal.
Additional notes:
- Codex CLI version: 0.161.0
- Environment: JetBrains IDE integrated terminal on Windows
- No keyboard input or text pasting is required to trigger the issue.
- The garbled characters appear to resemble incorrectly processed terminal mouse-event escape sequences.
- A screenshot demonstrating the issue has been attached.
What is the expected behavior?
No response
Additional information
No response
Activity
github-actions commentedon Oct 8, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
etraut-openai commentedon Oct 10, 2026
(response from codex)
Thanks for the report. Windows 10 is out of Microsoft’s general support, and Codex support on updated Windows 10 systems is best effort.
As a workaround, run
/tui, select Scrollback, and restart Codex. Please let us know whether that stops the corruption.To help diagnose, could you also share:
winver.codex --versionfrom that terminal.blindvigil commentedon Oct 20, 2026
Current Windows desktop reproduction
I can reproduce the same class of mouse-reporting corruption in the Codex Windows desktop app, not only in a JetBrains terminal.
Environment
26.930.7945.026200.9457, x64Observed behavior
Expected behavior
Mouse input must never be routed into the chat composer as terminal escape-sequence text. If mouse-reporting state becomes invalid, the app should reset it without requiring a full restart.
This is severe because it interrupts the active task and forces an application restart.
davidcgie commentedon Oct 29, 2026
thread id: 01a18715-a5ca-77e0-9617-da971b3a78a6
happens also on windows in visual studio code codex cli. no idea what it is triggered by. only fix is to /exit and start codex cli again
etraut-openai commentedon Nov 26, 2026
(response from codex)
Thanks for the report. I reproduced this on Windows 10 in IntelliJ IDEA Community 2025.1.2 with Codex CLI 0.161.0 and 0.172.0.
To work around it, launch
codex --no-alt-screen, or run/tui, select Scrollback, and restart Codex. I verified the launch flag in IntelliJ, and a GoLand user confirmed that Scrollback worked.In the IntelliJ build I tested, the Windows console bridge sent one command to enable both mouse tracking and SGR mouse encoding. JediTerm, the terminal emulator bundled with IntelliJ, applied only the first setting. Windows then delivered parts of the mouse reports to Codex as keystrokes.
When I temporarily changed JediTerm to apply both settings, the corruption stopped in Fullscreen with both Codex versions unchanged. I haven’t verified whether JetBrains has shipped a fix.
I’m closing this as not planned because the fix for the JetBrains behavior I reproduced belongs in JediTerm. The VS Code and Windows desktop reports may have different causes. For VS Code, #60125 documents a similar failure after reloading the window.