Problem
Each ACP session spawns 3 node processes (npx launcher, claude-agent-acp adapter, claude-agent-sdk CLI). When sessions complete or crash, these processes are NOT cleaned up. Over time this leaks massive amounts of RAM.
Reproduction
- Run multiple ACP sessions via
sessions_spawn(runtime: "acp")
- After they complete, check running processes:
wmic process where "name='node.exe'" get ProcessId,CommandLine
- Zombie processes remain from completed/crashed sessions.
Impact
We found 200+ orphaned node processes consuming ~2.5 GB RAM on a machine with 8 GB total. New ACP sessions crashed with:
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
Environment
- OS: Windows 10 (10.0.19045)
- OpenClaw: v2026.4.2 (npm global install)
- Node.js: v22.16.0
- Plugin: acpx with claude-agent-acp@0.24.2
Workaround
Periodic cleanup script that kills processes matching claude-agent-acp, claude-agent-sdk, and related npx launchers.
Expected Behavior
The acpx plugin should terminate all child processes when an ACP session ends (whether success or failure). This likely requires killing the entire process tree, not just the top-level spawned process.
Problem
Each ACP session spawns 3 node processes (npx launcher, claude-agent-acp adapter, claude-agent-sdk CLI). When sessions complete or crash, these processes are NOT cleaned up. Over time this leaks massive amounts of RAM.
Reproduction
sessions_spawn(runtime: "acp")Impact
We found 200+ orphaned node processes consuming ~2.5 GB RAM on a machine with 8 GB total. New ACP sessions crashed with:
Environment
Workaround
Periodic cleanup script that kills processes matching
claude-agent-acp,claude-agent-sdk, and related npx launchers.Expected Behavior
The acpx plugin should terminate all child processes when an ACP session ends (whether success or failure). This likely requires killing the entire process tree, not just the top-level spawned process.