claude-code - 💡(How to fix) Fix [BUG] Claude Code uses legacy XTMODKEYS even when terminal advertises the kitty keyboard protocol

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

[PARSE ERROR] CSI code m has 2 > 1 parameters

Error Messages/Logs

[PARSE ERROR] CSI code m has 2 > 1 parameters

Root Cause

Cosmetic — input still works correctly. Reporting because (a) it pollutes .xsession-errors and any session log file, and (b) it indicates Claude Code isn't taking advantage of the richer key-event reporting that kitty's protocol provides (Ctrl+letter disambiguation, key-release events, etc.).

Code Example

[PARSE ERROR] CSI code m has 2 > 1 parameters
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Environment

  • Claude Code: 2.1.150
  • Terminal: kitty 0.41.1
  • OS: Debian 13 (trixie), x86_64
  • Shell: bash

Summary

When Claude Code runs inside kitty, it negotiates input handling via xterm's legacy modifyOtherKeys (XTMODKEYS — CSI > 4 ; 2 m) instead of using kitty's enhanced keyboard protocol. Kitty advertises support for its own protocol and emits a diagnostic recommending the app switch.

Observed

Kitty prints, repeatedly:

The application is trying to use xterm's modifyOtherKeys. This is superseded by the kitty keyboard protocol https://sw.kovidgoyal.net/kitty/keyboard-protocol. The application should be updated to use that. [PARSE ERROR] CSI code m has 2 > 1 parameters

The pattern correlates with focus/input re-initialisation, suggesting Claude Code re-asserts input modes after focus-in or idle wake.

What Should Happen?

Expected

When the terminal responds positively to the kitty keyboard protocol query (CSI ? u), Claude Code should use it instead of falling back to / additionally sending XTMODKEYS, eliminating both the kitty diagnostic and the CSI parse warning.

Error Messages/Logs

[PARSE ERROR] CSI code m has 2 > 1 parameters

Steps to Reproduce

  1. Launch kitty (0.41.x).
  2. Run claude (2.1.150) inside it.
  3. Interact normally, then either: - move focus away and back (focus-follows-mouse setups will trigger it just by mousing over another window), or - leave the window idle for a few seconds and resume typing.
  4. Observe ~/.xsession-errors.

Impact

Cosmetic — input still works correctly. Reporting because (a) it pollutes .xsession-errors and any session log file, and (b) it indicates Claude Code isn't taking advantage of the richer key-event reporting that kitty's protocol provides (Ctrl+letter disambiguation, key-release events, etc.).

References

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

Claude Code: 2.1.150

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

No response

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING