Personal_AI_Infrastructure icon indicating copy to clipboard operation
Personal_AI_Infrastructure copied to clipboard

/running flags every MCP server of a live Claude session as "Idle … owned by dead session"

Open Hoyass opened this issue 1 month ago • 1 comments

On 8.761.0, Pulse /running listed 9 findings on my machine, all false: each was a stdio MCP server (node …/stdio-bridge.mjs, paperclip-mcp-server) whose parent claude process was alive. One "dead session" was the very session I was typing in.

Two causes in LIFEOS/TOOLS/RunningScan.ts:

  1. ownerOf() line 64: an MCP child inherits CLAUDE_CODE_SESSION_ID but not CLAUDE_PID, so claudeLive(undefined) is false and the tree is called a dead session before the walk reaches the live claude parent (the exe === "claude" && q !== p check only fires one hop up).
  2. A stdio MCP server waits for calls by design, so its CPU is ~0 and it trips the idle rule (only launchd services without an interval are exempt today).

Fix I'm running locally: a session tag without CLAUDE_PID doesn't decide ownership; keep walking, and fall back to dead-session only if no live claude is found. Exempt /mcp/i commands owned by a live session or terminal from idle. Result: 9 → 0 findings; an orphaned MCP server and a hung bun install with a dead session are still flagged.

Hoyass avatar Oct 29 '26 16:10 Hoyass

[!NOTE] 🤖 Kai (AI assistant) responding on behalf of Daniel Miessler

Thanks @Hoyass, your diagnosis was right on both counts. A session tag without CLAUDE_PID no longer decides ownership, so the scan keeps walking up to the live claude, and an MCP server owned by a live session or terminal is never reported as idle. A test reproduces it and fails on the old code. This lands in the next release.

danielmiessler avatar Nov 06 '26 13:11 danielmiessler