{"slug": "show-hn-machine-load-see-which-ai-coding-session-is-slowing-your-mac", "title": "Show HN: Machine-load – see which AI coding session is slowing your Mac", "summary": "Stak Technologies released machine-load, an unofficial open-source macOS utility that groups a Mac's CPU, GPU and memory load by the Claude Code session or project that started each process, so users can see which of several concurrent sessions is slowing the machine. The tool installs as a Claude Code plugin via `/plugin install machine-load --marketplace Stak-Technologies/machine-load` and adds a load chip above the prompt, a `/load` side panel with a 30-minute load chart, and a sortable details table covering Claude sessions, detached jobs and system apps. Machine-load attributes work to sessions by walking parent processes against `~/.claude/sessions/*.json`, reading only the `CLAUDE_PID` environment variable from re-parented background jobs, and matching Docker containers through their `docker run` command or `CI_SHA`/`CI_BRANCH` variables; Stak Technologies states nothing leaves the machine and that the utility is not affiliated with or endorsed by Anthropic.", "body_md": "A session-first view of your Mac's load, inside Claude Code.\n\nMost monitors group work by program: \"node ×87\", \"Docker\". When several Claude Code sessions run at once, the questions are different. Which session is slowing my machine down? What is it running? Which one should I pause? machine-load answers by grouping everything (child processes, background jobs that lost their parent, and Docker containers) under the Claude Code session or project that started it.\n\nAn unofficial open-source utility from Stak Technologies. Not a supported product.\n\n**macOS only. Unofficial: not affiliated with or endorsed by Anthropic. Provided as-is, with no support.**\n\n- **A load chip above the prompt.** It shows the load average with a coloured dot (calm, busy, overloaded) and opens the panel when clicked. When another mod already has a row there, the chip sits on the same line. It also adds a small 30-minute load chart beside the[ponytail](https://github.com/DietrichGebert/ponytail) band when that band is expanded.\n- **A side panel** (`/load` ) that explains the load number in plain English (\"on average 34 tasks wanted the processor at once; your Mac has 10 cores\"), with a 30-minute load chart and CPU, GPU and memory figures.\n- **A details table** with sortable columns (name, running time, CPU, memory). Rows hold their place between refreshes, so the list doesn't jump while you read it. It has three collapsible sections:\n  - **Claude sessions:** each session's processes and Docker containers.\n  - **Detached jobs:** work whose session has ended, grouped by folder.\n  - **Mac apps and system.**\n- **A Docker drill-down.** Each container shows its image, the branch and step it is running, how long it has been up, and the session that started it.\n- **Search** across sessions, folders, branches and programs. Case, spaces and dashes are ignored, so`billing api` finds`billing-api-worktree` .\n- **`/load demo`** swaps in made-up sessions, so you can take screenshots without showing your own work. Run it again to switch back.\n- **Plain-English labels** such as \"Jest test worker\", \"Next.js dev server\" and \"Playwright test browser\", instead of raw command lines.\n\nIn Claude Code, type:\n\n```\n/plugin install machine-load --marketplace Stak-Technologies/machine-load\n```\n\nAnswer `y` to add the marketplace, then pick a scope. The chip appears above the prompt in new sessions, and `/load` opens the panel.\n\nIn order:\n\n1. **Parent processes.** Walk up a process's parents until reaching a live Claude Code session (from`~/.claude/sessions/*.json` , checked against the process start time so a reused PID is not credited to the wrong session).\n2. **`CLAUDE_PID`.** Background jobs whose shell exited are re-parented to launchd but still carry the`CLAUDE_PID` of the session that started them. Only that one variable is read from a process's environment, and the rest is discarded straight away.\n3. **Docker.**  - A container is tied to the `docker run` command that started it, and that command is traced as in steps 1–2.\n  - If you pass `-e CI_SHA=<commit>` to`docker run` (and optionally`-e CI_BRANCH=<branch>` ), the match is exact and the branch is shown.\n  - Without those variables, a container is matched to a `docker run` of the same image when there is only one.\n  - Compose containers are matched through their project's working folder.\n4. A container is tied to the \n5. **Folder.** If none of the above works, a job is grouped by its working folder, and credited to a session only when exactly one session works in that folder.\n\n- Full command lines are never shown. Labels come from a fixed list, the program name, a script's file name, a Python module name (`-m` ) or an npm script name.\n- Of a process's environment, only `CLAUDE_PID` is kept:`ps` reads the rest, which is discarded at once and never stored or shown. Of a container's environment, only`CI_SHA` and`CI_BRANCH` leave Docker.\n- Nothing leaves your machine. To keep the cost low with many sessions open, one session samples every 10 seconds and the others read its result from `~/.claude/state/machine-load.json` . That file holds labels, session names, folder paths and branch names; never command-line arguments or environment values. If`DOCKER_HOST` points at a remote Docker server, the plugin's`docker` calls go there.\n\n- **macOS only. Unofficial: not affiliated with or endorsed by Anthropic. Provided as-is, with no support.** It uses`sysctl` ,`ioreg` ,`memory_pressure` ,`ps` and`lsof` .\n- It depends on Claude Code's `~/.claude/sessions` files, which are not a documented interface and may change in a future Claude Code release.\n- Fan speed is not shown, because it needs admin rights on Apple Silicon.\n- CPU % is a share of one core (100% = one core fully busy).\n\n```\nclaude plugin validate .\nclaude plugin test .\n```\n\nMIT. See [LICENSE](https://github.com/Stak-Technologies/machine-load/blob/main/LICENSE).", "url": "https://wpnews.pro/news/show-hn-machine-load-see-which-ai-coding-session-is-slowing-your-mac", "canonical_source": "https://github.com/Stak-Technologies/machine-load", "published_at": "2026-11-27 19:24:30+00:00", "updated_at": "2026-11-27 19:43:45.436915+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools", "ai-agents", "ai-products"], "entities": ["Stak Technologies", "Anthropic", "Claude Code", "machine-load", "Docker", "macOS"], "also_reported_by": [], "takeaway": "machine-load attributes each process, detached background job and Docker container to the Claude Code session that started it by walking parent processes against ~/.claude/sessions/*.json and reading only the CLAUDE_PID variable, so concurrent sessions can be told apart.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/show-hn-machine-load-see-which-ai-coding-session-is-slowing-your-mac", "markdown": "https://wpnews.pro/news/show-hn-machine-load-see-which-ai-coding-session-is-slowing-your-mac.md", "text": "https://wpnews.pro/news/show-hn-machine-load-see-which-ai-coding-session-is-slowing-your-mac.txt", "jsonld": "https://wpnews.pro/news/show-hn-machine-load-see-which-ai-coding-session-is-slowing-your-mac.jsonld"}}