t3code icon indicating copy to clipboard operation
t3code copied to clipboard

[Bug]: Regression Terminal occasionally displays raw mouse event sequences when opened

Open Sy-D opened this issue 3 months ago • 5 comments

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

0828.mov

Workaround

No response

Sy-D avatar Aug 28 '26 19:08 Sy-D

@Sy-D , did you by any chance run a mouse tracking TUI in the integrated terminal?

StiensWout avatar Aug 29 '26 09:08 StiensWout

@StiensWout nothing fancy just zsh. Somehow going back to that window or thread resulted in the terminal only printing those events

Sy-D avatar Aug 30 '26 01:08 Sy-D

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.

pnupu avatar Sep 02 '26 11:09 pnupu

@StiensWout oh my bad misunderstood you. It was claude code as @pnupu found out and solved it. thanks!

Sy-D avatar Sep 02 '26 13:09 Sy-D

[!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.

t3dotgg avatar Sep 04 '26 02:09 t3dotgg