Closed Claude Code sessions leave `disclaimer` + MCP child processes alive, accumulating GBs of RAM over a day

Resolved 💬 4 comments Opened May 14, 2026 by arturo-natella Closed May 19, 2026

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 disclaimer launcher processes, oldest 27+ hours
  • 60 npm exec ... mcp child processes (3 plugins × 20 sessions)
  • ~3.1 GB resident RAM consumed by MCP servers alone
  • All children parented to a single live Claude.app PID, 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

  1. Install one or more MCP plugins globally (e.g. pinecone, playwright, context7).
  2. Open a Claude Code session, then close its window (do not Cmd-Q the app).
  3. Repeat several times across a day.
  4. 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
`
The first count grows with sessions opened (not sessions currently visible); the second is roughly
N_sessions * N_global_MCP_plugins`.

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

  1. On Claude Code window/tab close, explicitly SIGTERM the associated disclaimer PID and its descendants.
  2. Or, share a single MCP server instance per plugin across all sessions on the same machine, with multiplexed stdio.

View original on GitHub ↗

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