Developer Gerrux has released claude-load, an open-source mod for Claude Code that provides granular visibility into resource consumption across multiple concurrent sessions. The tool emerged after the developer discovered that 15 open sessions were collectively consuming 10.8 GB of RAM, with several idle windows holding 0.5–0.7 GB each due to persistent MCP servers and subagents. By mapping process trees to session IDs via undocumented JSON registry files, the mod transforms a chaotic wall of node and claude processes into an actionable dashboard.

Unmasking the Invisible Load

Standard process monitors fail to distinguish between Claude Code sessions because they all spawn identical node, claude, and bash processes. The mod circumvents this by reading ~/.claude/sessions/.json, a private registry containing session metadata such as names, status, and working directories. It then performs a parent process ID (PPID) tree walk to attribute every child process, including Vite servers and pytest runs, to its originating session. This attribution reveals that a single idle session retains roughly 300–450 MB for the core agent plus additional overhead for MCP servers, explaining how a dozen forgotten windows can silently eat gigabytes.

The Orphan Problem and Safety Mechanisms

A significant portion of the mod’s engineering focuses on 'orphan' processesβ€”dev tools like language servers or Python scripts that outlive their parent session. The initial heuristic for identifying orphans proved dangerous, potentially flagging live IDE helpers as candidates for termination. The final implementation strictly defines an orphan as a process tree whose root parent is dead or has been reparented to init, systemd, or launchd. To prevent catastrophic PID reuse errors during termination, the mod enforces a 15-second freshness check on process snapshots and verifies that the target PID still matches the expected process name before executing kill commands.

Performance and Architecture

To avoid becoming a resource hog itself, claude-load employs a single sampler process per machine that writes to ~/.claude/state/load/snapshot.json, which individual session mods read every five seconds. On Windows, the sampler uses a hybrid approach: it polls Get-Process (76 ms) every four seconds for basic stats and queries the expensive CIM parent tree (400 ms) only when new PIDs appear, keeping total overhead at approximately 0.35% CPU and 130 MB RAM. The mod is built on the new 'mods' plugin architecture introduced in Claude Code 2.1.287, which restricts external access to a sandboxed engine interface $, prohibiting direct Node.js or DOM access.

AI-Assisted Development Reality

The development process highlights the current state of AI-native coding: the mod was written entirely by Claude Opus 5.5 in a couple of days, with the human developer acting as a client and reviewer. The author noted that the AI handled complex platform-specific logic, such as reading working directories from process memory on Windows via NtQueryInformationProcess, and generated 59 tests to cover edge cases like path parsing and pluralization rules. However, the AI also required guidance on engine-specific constraints, such as the prohibition of passing the $ object through closures or imports, demonstrating that while AI can write the code, it still struggles with the nuanced boundaries of proprietary plugin APIs.

Key Takeaways

  • Idle Claude Code sessions are not free; each retains 0.5–0.7 GB of RAM due to MCP server overhead, even when no tasks are running.
  • The mod relies on undocumented internal files in ~/.claude/sessions/, making it vulnerable to breakage if Anthropic changes the registry format.
  • Claude Code 2.1.287’s new 'mods' system enforces a strict sandbox with no Node/DOM access, requiring all I/O to go through the $ engine interface.
  • The tool successfully reduced the author’s memory usage by 4 GB by identifying and archiving 12 of 15 sessions, including orphaned processes.

The Bottom Line

Claude Code’s multi-session workflow is powerful but leaks memory silently, and claude-load proves that observability is the missing link between agent autonomy and resource discipline.