antivirusakash

Swarm Brake — Development skill for Claude Code

Development community

Stop Claude Code and Codex agent swarms from freezing your Mac.

How to install Swarm Brake

This entry records only its repository, not the path inside it, so there is no exact command to give. Open antivirusakash/swarm-brake and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Swarm Brake does

Stop Claude Code and Codex agent swarms from freezing your Mac. Heavy jobs like video renders, builds and headless browsers wait their turn when memory or CPU runs low, leftover Chrome gets cleaned up, and a log shows what froze your machine.

Alternatives in Development

  • Claude Token Efficient — One CLAUDE.md file 3.8k ★
  • Portaljs Add Chart — Add a chart (line, bar, area, pie, or scatter) to a dataset's showcase in a PortalJS portal 2.3k ★
  • Investigate Performance — Investigate a Nimbalyst performance problem (freeze, lag, idle CPU, slow op, memory growth) with measured evid 1.6k ★

README

swarm-brake: a bee holding a stop sign while two smaller bees wait

swarm-brake

**Keep Claude Code and Codex agent swarms from freezing your Mac.**

[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![Claude Code plugin](https://img.shields.io/badge/Claude%20Code-plugin-d97757.svg)](#install) [![Codex CLI](https://img.shields.io/badge/Codex%20CLI-0.154%2B-black.svg)](#install) [![macOS](https://img.shields.io/badge/tested%20on-macOS-lightgrey.svg)](#status) [![bash 3.2](https://img.shields.io/badge/bash-3.2-4EAA25.svg)](bin/swarm-brake)

[Install](#install) · [Before and after](#before-and-after) · [Settings](#settings) · [Logs and the report](#logs-and-the-report)

Your Claude Code agents froze your Mac again. swarm-brake is a hook plugin for Claude Code and Codex CLI that makes heavy jobs (video renders, builds, headless Chrome) wait their turn when memory or CPU runs low, cleans up the Chrome processes renders leave behind, and logs every heavy job so you can see what froze the machine.

Agents decide on their own to render a video, run a build or start two subagents in parallel. None of them checks whether the laptop has room first. swarm-brake checks for them.

Why I built it

I run a lot of Claude Code sessions on a 16 GB MacBook (10 cores). Over one week the machine kept falling over, and every time I traced it back to the same thing: agents starting heavy work with no idea what else was running.

**2026-10-08.** My external SSD started returning `EPERM` to whole terminal trees. The cause turned out to be memory: swap was at 11.8 of 13 GB, and macOS's privacy daemon (`tccd`) was answering too late or getting killed by jetsam, so every file check failed closed. There were 20 `claude` processes (3.6 GB, many idle for 8+ days), each with its own 3 MCP servers: 57 node processes. Killing the idle sessions brought swap down to 6.4 GB.

**2026-10-1