Closed Claude Code sessions leave `disclaimer` + MCP child processes alive, accumulating GBs of RAM over a day
Summary
When a Claude Code session window/tab is closed without explicitly quitting the desktop app, the Claude.app/Contents/Helpers/disclaimer launcher process keeps running, along with every MCP server subprocess it spawned. These accumulate indefinitely as new sessions are opened.
Environment
- Claude Code 2.1.138 (desktop app)
- macOS 15.x (Darwin 25.3.0)
- Shell: zsh
- MCP plugins installed globally:
pinecone,playwright,context7(among others)
Observed
After roughly a day of normal usage (opening/closing Claude Code windows for various tasks):
- 20 live
disclaimerlauncher processes, oldest 27+ hours - 60
npm exec ... mcpchild processes (3 plugins × 20 sessions) - ~3.1 GB resident RAM consumed by MCP servers alone
- All children parented to a single live
Claude.appPID, so they are not orphaned in the unix sense — but the visible UI for those sessions is long gone
Sample (post-cleanup metrics):
| | Before cleanup | After killing stale launchers |
|---|---|---|
| MCP processes | 60 | 3 |
| MCP RAM (RSS) | 3.1 GB | 0.31 GB |
| Live Claude sessions | 20 | 1 |
Expected
Closing a Claude Code window should reap its disclaimer helper and cascade-kill its MCP server children. Alternatively, a per-plugin daemon shared across sessions would avoid N-copies-per-plugin scaling.
Repro
- Install one or more MCP plugins globally (e.g.
pinecone,playwright,context7). - Open a Claude Code session, then close its window (do not Cmd-Q the app).
- Repeat several times across a day.
- Check process counts:
``bash`
ps -ax | grep "Helpers/disclaimer" | grep -v grep | wc -l
ps -ax | grep "npm exec.*mcp" | grep -v grep | wc -l
N_sessions * N_global_MCP_plugins`.
The first count grows with sessions opened (not sessions currently visible); the second is roughly
Workaround
Manually kill stale launcher PIDs (skip the current session's):
ps -axo pid=,etime=,comm= | grep disclaimer
kill -TERM <stale-pid>
This cascade-kills the MCP children cleanly.
Impact
On a 16 GB Mac, 3.1 GB of phantom MCP processes is meaningful — especially paired with browser tabs, IDE, and other normal workloads. Users likely won't connect "Claude Code feels slow" or "system is swapping" to invisible MCP zombies from yesterday's sessions.
Suggested fixes
- On Claude Code window/tab close, explicitly
SIGTERMthe associateddisclaimerPID and its descendants. - Or, share a single MCP server instance per plugin across all sessions on the same machine, with multiplexed stdio.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗