[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
- ensure source file open in IntelliJ IDE
- open Claude Code in IntelliJ terminal
- issue prompt in the CLI
- 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. -->
11 Comments
Looking into it now! 👀
hey @johnw3d, any chance you can see if this is happening to you in plugin version 0.1.8-beta? thanks!
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
Following up on this -- it keeps accepting changes when I'm typing because the code diff box pops up
@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
Relates to:
Current versions of everything, still having the issue:
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.
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.
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.
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.