[Bug] ESC key doesn't work when claude terminal is started by intellij

Status Open
Maintainer reply None cached
Activity 11 comments · opened Oct 30, 2025

Bug Description
When I launch clode from the Intellij plugin the ESC key doesn't work, so I can't step out of a specific command and I have to entirely quit the session by using CTRL+C. If I launch claude directly from the Intellij terminal it works fine.

Environment Info

  • Platform: darwin
  • Terminal: intellij
  • Version: 2.0.29
  • Feedback ID: 2839ff11-23ec-4502-8391-f600cbaf5b6b

Errors

[{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n    at YD (file:///Users/johannes/.local/share/mise/installs/node/24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1175:4413)\n    at file:///Users/johannes/.local/share/mise/installs/node/24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1175:4141\n    at Array.map (<anonymous>)\n    at MF (file:///Users/johannes/.local/share/mise/installs/node/24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1175:4132)\n    at YTQ (file:///Users/johannes/.local/share/mise/installs/node/24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1797:6306)\n    at Vw (file:///Users/johannes/.local/share/mise/installs/node/24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:73:19414)\n    at Io (file:///Users/johannes/.local/share/mise/installs/node/24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:75:42806)\n    at T9 (file:///Users/johannes/.local/share/mise/installs/node/24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:75:38347)\n    at zc (file:///Users/johannes/.local/share/mise/installs/node/24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:75:38275)\n    at Lw (file:///Users/johannes/.local/share/mise/installs/node/24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:75:38129)","timestamp":"2025-10-30T01:13:26.315Z"}]

View original on GitHub ↗

11 Comments

github-actions[bot] · 10 months ago

Found 2 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/2344
  2. https://github.com/anthropics/claude-code/issues/1002

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

jonnybbb · 10 months ago

If I remember correctly, it used to work in a previous version of the plugin. I also have Settings -> Tools -> Terminal and unchecked "Move focus to the editor with Escape."
I have the latest IDE and plugin installed

github-actions[bot] · 8 months ago

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

betawait · 8 months ago

I ran into this as well. I am using Claude Code in a dev container in IntelliJ.

Workaround is to use Ctrl-[ or Ctrl-Esc.

The settings in IntelliJ to disable moving to the editor did not work for me.

jja725 · 8 months ago

ran into same problem here with same situation, I also have Settings -> Tools -> Terminal and unchecked "Move focus to the editor with Escape."
I have the latest IDE and plugin installed

lucacavazzana · 8 months ago

For me worked _Go to Settings_ => _Tools_ => _Terminal_ => _Configure terminal keybindings_ and delete the _“Switch focus to Editor”_ shortcut

_"Move focus to the editor with Escape"_ was already unchecked (probably by default?)

Running current IntelliJ IDEA 2025.3 on Ubuntu 25.04

Sources:

yhao3 · 8 months ago

~~I found a workaround: switching IntelliJ Terminal Engine from Classic to Reworked 2025 fixes the issue.~~
~~With Reworked 2025, the ESC key works correctly to interrupt Claude Code.~~

Update: ESC still has issues even with Reworked 2025 enabled.

I can reproduce the problem, and switching to Reworked 2025 is not a reliable fix.
As mentioned by @betawait above, using Ctrl-[ or Ctrl-Esc works more consistently as a workaround.

kenarsuleyman · 8 months ago
I found a workaround: switching IntelliJ Terminal Engine from Classic to Reworked 2025 fixes the issue. With Reworked 2025, the ESC key works correctly to interrupt Claude Code. <img alt="Image" width="669" height="136" src="https://private-user-images.githubusercontent.com/97726491/530254965-c9496251-32af-4112-8356-51f2123e80c5.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjczNjA3NTcsIm5iZiI6MTc2NzM2MDQ1NywicGF0aCI6Ii85NzcyNjQ5MS81MzAyNTQ5NjUtYzk0OTYyNTEtMzJhZi00MTEyLTgzNTYtNTFmMjEyM2U4MGM1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAxMDIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMTAyVDEzMjczN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTdkZmRmMzc1YTc4MzI3YjIwY2ExYjJkZDY5NDE4N2E4NzA5NTMwZTMyMWExZGE0YjJhNzgyYjRlNjhjMjJkMzUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.ZH1fNYz0Kpr_aoIRvlNq68GF6iPM0pLusRVlbEpH0n4">

I am using Reworked 2025 and ESC still not working.

yhao3 · 8 months ago
> I found a workaround: switching IntelliJ Terminal Engine from Classic to Reworked 2025 fixes the issue. With Reworked 2025, the ESC key works correctly to interrupt Claude Code. > <img alt="Image" width="669" height="136" src="https://private-user-images.githubusercontent.com/97726491/530254965-c9496251-32af-4112-8356-51f2123e80c5.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NjczNjA3NTcsIm5iZiI6MTc2NzM2MDQ1NywicGF0aCI6Ii85NzcyNjQ5MS81MzAyNTQ5NjUtYzk0OTYyNTEtMzJhZi00MTEyLTgzNTYtNTFmMjEyM2U4MGM1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAxMDIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMTAyVDEzMjczN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTdkZmRmMzc1YTc4MzI3YjIwY2ExYjJkZDY5NDE4N2E4NzA5NTMwZTMyMWExZGE0YjJhNzgyYjRlNjhjMjJkMzUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.ZH1fNYz0Kpr_aoIRvlNq68GF6iPM0pLusRVlbEpH0n4"> I am using Reworked 2025 and ESC still not working.

@kenarsuleyman You're right — I've corrected my comment. Sorry for the incorrect information.

limsko · 7 months ago

Same problem, no workaround.

tavori · 7 months ago

<img width="992" height="735" alt="Image" src="https://github.com/user-attachments/assets/11a96c25-c4b8-4ae5-b0d1-90c531b918c9" />

remove all keymap of terminal

  • Escape inherited from Escape
  • Switch Focus to Editor

<img width="552" height="194" alt="Image" src="https://github.com/user-attachments/assets/dc8a11e2-c0a1-4ca9-a273-3aade4c2b611" />