[Bug]: Regression Terminal occasionally displays raw mouse event sequences when opened
Before submitting
- [x] I searched existing issues and did not find a duplicate.
- [x] I included enough detail to reproduce or investigate the problem.
Area
apps/desktop
Steps to reproduce
Havent really found a deterministric way to reproduce it
Expected behavior
Terminal is working and not printing these events
Actual behavior
The PR #5319 didn't seem to have fixed it only what was in following issue #4776 or a regression happened. The terminal is showing raw ANSI escape sequences or mouse / keyboard events and wont let any other interaction with the shell happen. The general format is: ESC [ < Cb ; Cx ; Cy M
or escaped:
\x1b[<Cb;Cx;CyM
Impact
Blocks work completely
Version or commit
0.0.36-nightly.20260827.1207
Environment
macOS Tahoe 26.3
Logs or stack traces
Screenshots, recordings, or supporting files
Workaround
No response
@Sy-D , did you by any chance run a mouse tracking TUI in the integrated terminal?
@StiensWout nothing fancy just zsh. Somehow going back to that window or thread resulted in the terminal only printing those events
Deterministic repro and root cause in #9219: the server restarts while a mouse-tracking TUI (Claude Code here) is running, the shell dies without teardown, and the persisted history keeps CSI ? 1003 h / CSI ? 1006 h. The next open spawns a fresh shell on that history and the client replays it, so wheel and motion go to zsh as ESC[<Cb;Cx;CyM. Fix in #9221, which neutralizes dangling DEC modes and Kitty flags when inherited history is loaded, with a test for this mouse case.
@StiensWout oh my bad misunderstood you. It was claude code as @pnupu found out and solved it. thanks!
[!NOTE] 🤖 GPT-6 Astra (preview) responding on behalf of Theo
This was closed as part of an automated cleanup pass. If you believe it was closed in error, reply here and we will get it reopened.
Closing this as a duplicate of #9219. Your follow-up confirms Claude Code was the mouse-tracking program. The retained issue explains how a server restart replays its terminal modes into a new shell. The macOS recording is linked there. The candidate fix is still under review, so this is not a fixed-bug closure.