claude-code - 💡(How to fix) Fix [BUG] IntelliJ plugin: ACP agent and `claude` child survive `/exit` and tool window close (orphaned processes)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

When using Claude Code through the IntelliJ IDEA plugin, running /exit and closing the Claude Code tool window leaves the entire process chain alive. The processes only get reaped when IntelliJ itself is quit (parent-death cleanup by launchd). Over a workday this leaks one chain per session.

Root Cause

When using Claude Code through the IntelliJ IDEA plugin, running /exit and closing the Claude Code tool window leaves the entire process chain alive. The processes only get reaped when IntelliJ itself is quit (parent-death cleanup by launchd). Over a workday this leaks one chain per session.

Fix Action

Fix / Workaround

  • I have not been able to repro on Zed (only IntelliJ here), but the package name @zed-industries/claude-agent-acp is shared upstream — the same lifecycle bug may manifest there if the editor doesn't close stdio on tool-window close.
  • Workaround: kill <npm-exec-pid>; the children exit cleanly within a couple of seconds.

Code Example

IntelliJ IDEA (PID 65509, parent = launchd)
  └─ npm exec @zed-industries/claude-agent-acp@0.22.2 --hide-claude-auth (96104)
       └─ node .../JetBrains/IntelliJIdea2026.1/acp-agents/.runtimes/node/24.13.0/.../claude-agent-acp --hide-claude-auth (96130)
            └─ claude (96231)
RAW_BUFFERClick to expand / collapse

Summary

When using Claude Code through the IntelliJ IDEA plugin, running /exit and closing the Claude Code tool window leaves the entire process chain alive. The processes only get reaped when IntelliJ itself is quit (parent-death cleanup by launchd). Over a workday this leaks one chain per session.

Environment

  • macOS 15 (Darwin 24.6.0), Apple Silicon
  • IntelliJ IDEA 2026.1.1
  • @zed-industries/claude-agent-acp 0.22.2 (npm package used by the JetBrains plugin)
  • Claude Code CLI 2.1.132
  • Node 24.13.0 (bundled in JetBrains/IntelliJIdea2026.1/acp-agents/.runtimes/)

Reproduction

  1. Open IntelliJ IDEA, open the Claude Code tool window in a project.
  2. Run /exit in the Claude Code session.
  3. Close the Claude Code tool window (X on the panel).
  4. ps auxww | grep -E 'claude|claude-agent-acp' — the chain is still running.

Observed process chain

IntelliJ IDEA (PID 65509, parent = launchd)
  └─ npm exec @zed-industries/[email protected] --hide-claude-auth (96104)
       └─ node .../JetBrains/IntelliJIdea2026.1/acp-agents/.runtimes/node/24.13.0/.../claude-agent-acp --hide-claude-auth (96130)
            └─ claude (96231)

etime ~10 minutes after /exit and tool-window close; processes are idle (S state), not zombies. They are reaped only when IntelliJ is quit.

Expected

Closing the Claude Code tool window (or /exit from inside it) should send SIGTERM (or close stdio) to the ACP agent child; the ACP agent in turn should terminate its claude subprocess. The full chain should exit within a few seconds.

Actual

The plugin appears not to send a termination signal when the tool window closes. The ACP agent keeps running, and its child claude process likewise stays alive indefinitely.

Notes

  • I have not been able to repro on Zed (only IntelliJ here), but the package name @zed-industries/claude-agent-acp is shared upstream — the same lifecycle bug may manifest there if the editor doesn't close stdio on tool-window close.
  • Workaround: kill <npm-exec-pid>; the children exit cleanly within a couple of seconds.

🤖 Generated with Claude Code

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING