[BUG] Terminal display corruption + crosshair cursor after trust-dialog transition — Kitty rejects DECSET mode 2031 ("Unsupported screen mode")

Status Open
Reported on v2.1.221
Maintainer reply None cached
Activity 1 comment · opened Aug 4, 2026

Preflight Checklist

  • [x] Searched existing issues — no report matches this exact symptom/error string
  • [x] Single bug report
  • [x] Using latest version (2.1.221)

What's Wrong?

Immediately after accepting the "Do you trust this folder?" prompt and Claude Code transitions into its main interactive interface, the terminal enters a corrupted state: the mouse cursor changes to a crosshair, and the display stops updating (typed keystrokes don't render). Left-clicking repeatedly inside the terminal eventually forces a redraw and the session becomes usable again. Around the moment of the transition, the terminal itself prints:

parse error, unsupported screen mode: 2031 private

along with a message about modifyOtherKeys being superseded by the Kitty keyboard protocol.

Root cause appears to be that Claude Code sends CSI ? 2031 h (the "notify me of terminal color-scheme/theme changes" DECSET mode, per the Contour spec: https://contour-terminal.org/vt-extensions/color-palette-update-notifications/) when entering the main UI — likely to support auto theme following the OS light/dark setting, per the related closed feature request #63433. Kitty only added support for mode 2031 in v0.38.0 (Dec 2024); on versions older than that (e.g. 0.32.2, Feb 2024), Kitty doesn't recognize the mode and emits its own parse error, which appears to corrupt Claude Code's render/mouse-tracking state badly enough to require manual "unsticking."

Notably, my settings.json has "theme": "dark" explicitly set (not auto), so this fires regardless of the configured theme — suggesting the subscribe call is unconditional rather than gated on auto mode being active.

What Should Happen?

Claude Code should either (a) check terminal capabilities before sending CSI ? 2031 h, or (b) handle a non-ack / unsupported-mode response gracefully without corrupting the render/input state, so older terminals aren't left in a broken visual state.

Error Messages/Logs

parse error, unsupported screen mode: 2031 private

(plus a message noting modifyOtherKeys is superseded by the Kitty keyboard protocol, appearing around the same transition)

Steps to Reproduce

  1. Open a fresh terminal (tested in Kitty 0.32.2; also reproduces in a second, unspecified terminal emulator)
  2. Run claude in a directory not yet trusted
  3. Accept "Yes, I trust this folder"
  4. Immediately: cursor becomes a crosshair, terminal stops rendering new keystrokes, and the two messages above appear
  5. Repeatedly left-click inside the terminal — after enough clicks, rendering recovers and the session behaves normally

Claude Model

Not sure / Multiple models (not model-dependent — this is a terminal rendering issue)

Is this a regression?

I don't know — but the DECSET-2031 auto-theme-follow behavior this seems tied to (issue #63433) was only closed 2026-07-11, so this may be newly-introduced behavior colliding with older terminal versions rather than a long-standing bug.

Claude Code Version

2.1.221 (Claude Code)

Platform

Anthropic API

Operating System

Other Linux — Linux Mint 22.3 (Cinnamon), X11

Terminal/Shell

Other — Kitty 0.32.2 (also reproduces in a second terminal emulator, not yet identified)

Additional Information

  • claude doctor reports a healthy install, no installation issues.
  • Reinstalling Claude Code did not change the version (still 2.1.221) or resolve the issue.
  • Setting CLAUDE_CODE_DISABLE_MOUSE_CLICKS=1 did not fix it — this is a display/render corruption from an unrecognized escape sequence, not primarily a mouse-click-tracking conflict.
  • Workaround: updating Kitty to >=0.38.0 should avoid triggering the bug, since that's when Kitty added mode 2031 support — but this is a client-side workaround, not a fix to Claude Code's behavior.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗