[BUG] Kitty keyboard protocol sequences display as literal '<' and '<%' in JetBrains JediTerm (IntelliJ/WebStorm)

Resolved 💬 4 comments Opened Apr 15, 2026 by m3di Closed May 24, 2026

Preflight Checklist

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

What's Wrong?

Description

When running Claude Code in any JetBrains IDE terminal (JediTerm), two escape
sequences leak as visible characters on every claude launch:

  • < appears at the top of the splash screen
  • <% appears at the bottom after exit

This was previously reported in #18135 but closed as stale without a fix.

Environment

  • Claude Code version: 2.1.107
  • IDE: IntelliJ IDEA
  • Terminal: JetBrains-JediTerm
  • OS: macOS (Apple Silicon)
  • Shell: zsh

Steps to Reproduce

  1. Open any JetBrains IDE built-in terminal
  2. Run claude
  3. Observe < before the splash screen
  4. Run /exit
  5. Observe <% after exit

Root Cause (confirmed via script capture)

Two sequences leak because JediTerm doesn't handle them:

  • ^[[>0q (XTVERSION request) → leaks <
  • ^[[c (DA1 Device Attributes) → leaks <%

Attempted Workarounds — none worked

  • TERM_PROGRAM=JetBrains-JediTerm
  • CLAUDE_NO_KITTY_KEYBOARD=1
  • TERM=xterm

Proposed Fix

JediTerm automatically sets TERMINAL_EMULATOR=JetBrains-JediTerm in its
environment. Claude Code could detect this and skip the Kitty keyboard protocol
and DA1 query for that terminal.

What Should Happen?

No stray characters should appear. The escape sequences should be
handled silently by Claude Code when running inside JediTerm.

Error Messages/Logs

^[[>0q  (leaks '<')
^[[c    (leaks '<%')

Steps to Reproduce

  1. Open any JetBrains IDE built-in terminal (IntelliJ, WebStorm, etc.)
  2. Run claude
  3. Observe < displayed before the splash screen
  4. Type /exit
  5. Observe <% displayed after exit

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.107

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

IntelliJ IDEA terminal

Additional Information

Previously reported in #18135, closed as stale without a fix.
Root cause confirmed via script capture — two sequences leak because
JediTerm doesn't handle them silently.
JediTerm automatically sets TERMINAL_EMULATOR=JetBrains-JediTerm in the
environment, which Claude Code could use for detection.

View original on GitHub ↗

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