[BUG] IntelliJ plugin: ACP agent and `claude` child survive `/exit` and tool window close (orphaned processes)

Resolved 💬 3 comments Opened May 7, 2026 by blundski Closed May 10, 2026

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/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)

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

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗