[BUG] Kitty keyboard protocol sequences displayed as '<' in JetBrains JediTerm terminal

Resolved 💬 3 comments Opened Jan 14, 2026 by yannlombard Closed Feb 28, 2026

Description

When running Claude Code in JetBrains IDEs (WebStorm, IntelliJ, etc.) using the built-in terminal (JediTerm), the Kitty keyboard protocol escape sequences are displayed as literal < characters instead of being interpreted.

Steps to Reproduce

  1. Open WebStorm (or any JetBrains IDE) terminal
  2. Run claude
  3. Observe two < characters displayed before Claude Code UI appears
  4. Type /exit
  5. Observe two more < characters displayed

Expected Behavior

No stray characters should be displayed - the escape sequences should be handled silently.

Actual Behavior

The < character from the Kitty keyboard protocol sequence ESC [ < u (pop keyboard mode) is displayed literally because JediTerm doesn't support this protocol.

Debug Information

Captured via script command:

^[[<u^[[?1004l^[[?2004l...

The ^[[<u sequence is the Kitty keyboard protocol "pop" command that JediTerm doesn't recognize.

Environment

  • Claude Code version: 2.1.7
  • IDE: WebStorm 2025.3.1.1
  • Terminal: JetBrains-JediTerm
  • OS: macOS (Darwin 25.2.0)
  • TERM: xterm-256color

Proposed Solution

Add an environment variable (e.g., CLAUDE_CODE_DISABLE_KITTY_KEYBOARD=1) to disable the Kitty keyboard protocol, or detect JediTerm via TERMINAL_EMULATOR=JetBrains-JediTerm and automatically disable it.

Workaround Attempted

Setting TERM=xterm does not prevent the Kitty keyboard protocol from being used.

Related

This is similar to focus reporting issues (#10375) where escape sequences leak into the terminal display.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗