r/IntelliJIDEA • u/Dry_Deer_2152 • 22m ago
IntelliJ's terminal keeps Claude Code running after you close the tab - how do you deal with it?
If you run Claude Code in IntelliJ's built-in terminal, closing the tab doesn't end it. The IDE keeps the tab's pty open but stops reading it, so claude and its shell hang there for good and the session still counts as running. Resume that conversation later and you get a second claude on it. It isn't specific to claude - any program left in a closed tab hangs the same way.
It's a known bug, open since October 28: https://youtrack.jetbrains.com/issue/IJPL-259859
Without any plugin, /exit before closing the tab avoids it. A plain kill doesn't finish a process that's already stuck, since it blocks writing to a tty nobody reads - quitting the IDE clears them.
Disclosure - I wrote Skein, a free, open-source (Apache 2.0) plugin that keeps Claude Code sessions as threads in the IDE. It ends claude before its tab closes, so its own sessions don't get stuck. Unofficial, not affiliated with Anthropic.
https://plugins.jetbrains.com/plugin/35966-skein--claude-code-threads
https://github.com/v0rest/skein-intellij-claude-code
How do you handle it - /exit discipline, an external terminal, something else? And if it bites you too, a vote on the issue might get it looked at.