[BUG] After prompt response, keyboard focus no longer in CLI, jumps to source editor in IntelliJ

Status Closed — not planned
Maintainer reply ✓ Yes — hackyon-anthropic
Activity 11 comments · opened Jun 6, 2025 · closed Jan 9, 2026
💡 Likely answer: A maintainer (hackyon-anthropic, collaborator) responded on this thread — see the highlighted reply below.

Environment

  • Platform (select one):
  • [x ] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: v1.0.16
  • Operating System: MacOS 15.3.1 (24D70)
  • Terminal: IntelliJ built-in terminal

Bug Description

After entering a CLI prompt and receiving Claude response, keyboard focus is now in the current source, NOT the CLI, so typing next prompt overwrites source code so I have to repeatedly fix that and click back to the terminal

Steps to Reproduce

  1. ensure source file open in IntelliJ IDE
  2. open Claude Code in IntelliJ terminal
  3. issue prompt in the CLI
  4. after response is generated, note that keyboard focus now back in source file, NOT the CLI

Expected Behavior

Keyboard focus to stay in the CLI for the next prompt

Actual Behavior

Keyboard focus jumps to current source file in IntelliJ source editor

Additional Context

<!-- Add any other context about the problem here, such as screenshots, logs, etc. -->

View original on GitHub ↗

11 Comments

hackyon-anthropic collaborator · 1 year ago

Looking into it now! 👀

hackyon-anthropic collaborator · 1 year ago

hey @johnw3d, any chance you can see if this is happening to you in plugin version 0.1.8-beta? thanks!

chad-fossa · 1 year ago

This is actually incredibly frustrating because I'll be typing in the CLI, get a change suggestion, and then the next keystroke routinely "accepts" the change suggestion before I ever see it.

I am on plugin version 0.1.11-beta, claude code CLI 1.0.57

Note also that I use Vim mode, both in Claude and in Intellij

WebStorm 2025.1.3 Build #WS-251.26927.40, built on June 20, 2025 Source revision: ce471299dab0d Licensed to Chad Furman Subscription is active until February 27, 2026. Runtime version: 21.0.7+9-b895.130 aarch64 (JCEF 122.1.9) VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Toolkit: sun.lwawt.macosx.LWCToolkit macOS 15.5 GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation Memory: 8096M Cores: 11 Metal Rendering is ON Registry: ide.balloon.shadow.size=0 editor.distraction.free.mode=true debugger.new.tool.window.layout=true ide.experimental.ui=true cache.folding.model.on.disk=false Non-Bundled Plugins: com.intellij.notebooks.core (251.26927.70) org.jetbrains.completion.full.line (251.26927.999.1) com.jetbrains.edu (2025.6-2025.1-1078) monokai-pro (2.0.2) com.github.xepozz.gitcodeowners (2025.0.31) ru.adelf.idea.dotenv (251.23774.318) com.github.catppuccin.jetbrains (3.4.2) org.jetbrains.plugins.go-template (251.23774.318) org.jetbrains.junie (251.204.104) com.markskelton.one-dark-theme (5.13.0) name.kropp.intellij.makefile (251.25410.28) IdeaVIM (2.26.0) com.anthropic.code.plugin (0.1.11-beta) com.intellij.mermaid (0.0.25+IJ.243) com.intellij.kubernetes (251.26927.91) com.intellij.ml.llm (251.26094.80.22) com.intellij.grazie.pro (0.3.383) PlantUML integration (7.13.0-IJ2023.2) org.jetbrains.plugins.github (251.26927.54-IU) mdx.js (251.23774.318)
chad-fossa · 1 year ago

Following up on this -- it keeps accepting changes when I'm typing because the code diff box pops up

chad-fossa · 1 year ago

@hackyon-anthropic this is still happening. Claude Code will return a response in the middle of me typing, and then all of a sudden I've somehow responded to Claude's prompt and am no longer able to keep typing what I was typing previously (now with an extra unknown change).

I've resorted to auto-accepting edits but that's not a good solution

chad-fossa · 1 year ago

Current versions of everything, still having the issue:

WebStorm 2025.2
Build #WS-252.23892.411, built on August 1, 2025
Source revision: 0a9a69b3f9332
Licensed to Chad Furman
Subscription is active until February 27, 2026.
Runtime version: 21.0.7+6-b1038.58 aarch64 (JCEF 122.1.9)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.lwawt.macosx.LWCToolkit
macOS 15.5
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 8096M
Cores: 11
Metal Rendering is ON
Registry:
  ide.balloon.shadow.size=0
  editor.distraction.free.mode=true
  debugger.new.tool.window.layout=true
  ide.experimental.ui=true
  cache.folding.model.on.disk=false
Non-Bundled Plugins:
  org.jetbrains.junie (252.284.66)
  com.intellij.kubernetes (252.23892.515)
  org.jetbrains.plugins.go-template (252.23892.201)
  ru.adelf.idea.dotenv (252.23892.201)
  JavaScriptDebugger (252.23892.515)
  org.jetbrains.plugins.yaml (252.23892.464)
  org.jetbrains.completion.full.line (252.23892.458)
  com.intellij.ml.llm (252.23892.530)
  com.intellij.microservices.ui (252.23892.464)
  com.intellij.copyright (252.23892.464)
  org.jetbrains.security.package-checker (252.23892.464)
  org.editorconfig.editorconfigjetbrains (252.23892.464)
  com.intellij.notebooks.core (252.23892.464)
  name.kropp.intellij.makefile (252.23892.201)
  com.intellij.mermaid (0.0.26+IJ.252)
  com.intellij.grazie.pro (0.3.390)
  com.jetbrains.edu (2025.7-2025.2-431)
  org.jetbrains.plugins.github (252.23892.515-IU)
  PlantUML integration (7.13.0-IJ2023.2)
  AceJump (3.8.22)
  com.anthropic.code.plugin (0.1.11-beta)
  com.markskelton.one-dark-theme (5.14.1)
  com.github.catppuccin.jetbrains (3.4.2)
  monokai-pro (2.1.0)
  Docker (252.23892.515)
  com.jetbrains.restClient (252.23892.464)
  com.intellij.swagger (252.23892.464)
  com.intellij.react (252.23892.515)
  mdx.js (252.23892.298)
Wielding · 10 months ago

Claude code causes input focus issues when it is in the JetBrains integration terminal or any other terminal. I run swaywm and it messes with input focus when it is not even on a visible workspace and is not the currently focused window.

I'll occasionally switch to a terminal window or other application on another workspace and start typing and nothing happens.

I thought it was a sway issue but it turns out if I just stop claude wherever it may be running my keyboard input focus problems stop. So basically I have to be incredibly careful using any other applications while claude code is running anywhere or I might end up typing in the wrong place.

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.

github-actions[bot] · 7 months ago

This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.

github-actions[bot] · 7 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.