Skip to content

Claude agent (claude-code-acp) zombie node.exe processes persist after Zed exit on Windows (regression) #48722

@crisradu75

Description

@crisradu75

Check for existing issues

Describe the bug / problem

After closing Zed on Windows, node.exe processes spawned by the Claude Code ACP extension are not terminated. Each Claude agent session leaves behind a pair of orphaned processes:

  1. claude-code-acp/dist/index.js (ACP bridge)
  2. claude-agent-sdk/cli.js (Claude agent)

These processes accumulate across Zed sessions and are never cleaned up. After a day of normal use, I had 24 orphaned node.exe processes (12 pairs) from previous Zed sessions spanning 10:51 AM to 11:27 PM the prior day. Only 2 processes (1 pair) belonged to the currently running Zed instance.

The orphaned processes' original parent PIDs no longer exist, confirming Zed exited without terminating its child process trees.

Reproduction steps

  1. Open Zed on Windows with the Claude Code agent enabled.
  2. Use the Claude assistant in one or more panels/tabs.
  3. Close Zed.
  4. Reopen Zed and use the Claude assistant again.
  5. Repeat steps 3-4 several times.
  6. Check for leaked processes:
Get-CimInstance Win32_Process -Filter "Name='node.exe'" |
  ForEach-Object {
    $parentAlive = "NO"
    try { Get-Process -Id $_.ParentProcessId -ErrorAction Stop | Out-Null; $parentAlive = "YES" } catch {}
    [PSCustomObject]@{
      PID = $_.ProcessId
      ParentPID = $_.ParentProcessId
      ParentAlive = $parentAlive
      Created = $_.CreationDate
      CommandLine = $_.CommandLine
    }
  } | Format-Table PID, ParentPID, ParentAlive, Created -AutoSize

Expected behavior

All node.exe child processes spawned by the Claude Code ACP extension should be terminated when:

  • The associated Claude agent panel/tab is closed
  • Zed itself exits

Observed behavior

Processes persist indefinitely after Zed exits. Example output showing 12 orphaned pairs (ParentAlive=NO) plus 1 active pair:

PID   ParentPID ParentAlive Created
28024 37292     NO          2/7/2026 10:51:03 AM
33036 28024     YES         2/7/2026 10:51:03 AM
6616  19180     NO          2/7/2026 5:18:16 PM
40712 6616      YES         2/7/2026 5:18:17 PM
23704 39496     NO          2/7/2026 5:54:41 PM
8556  23704     YES         2/7/2026 5:54:41 PM
...
44860 8136      YES         2/8/2026 12:00:43 PM   <- current session
35980 44860     YES         2/8/2026 12:00:44 PM   <- current session

Note: the child claude-agent-sdk processes show ParentAlive=YES because their parent is the orphaned claude-code-acp process (not Zed), so they keep each other alive.

Environment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:ai/acpFeedback for Zed's Agent Client Protocolarea:performance/memory leakfrequency:commonBugs that happen for at least a third of the users across all platforms and kinds of usagemeta:duplicateAdditional reports of an existing issueplatform:windowshappens only on Windows, not other OSpriority:P2Average run-of-the-mill bugs

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions