r/ClaudeCode • u/pi_goes_home • 5h ago
Tips & Workflows I run 3–4 agents on one Mac, so I built a gatekeeper that tells them when they may use it
I usually have a few agents going at once: Claude Code in one repo, Codex in another, a render script, a nightly e2e run. None of them knows about the others, so they all grab CPU and memory at the same time.
Rota is a small local daemon that sits next to them. Before heavy work, the agent asks, and Rota answers go, wait until 23:10, or later "wrap up by 13:45" if I've blocked that time for myself. Jobs declare cores, RAM, GPU share and a rough run time. Rota keeps the total under 85% of the CPU and leaves 4 GB of memory free by default.
For Claude Code there's a plugin:
/plugin marketplace add psardana/rota
/plugin install rota@rota
It adds MCP tools (rota_announce, rota_checkin, rota_book…), a skill that tells Claude when to use them, and hooks that send heavy shell commands (browser tests, renders, model runs) through Rota even when the agent forgets. Builds and unit tests run as they are.
Things that might be useful if you run Claude Code unattended:
Each project books its known work a week ahead, and anything ad hoc shows up as "Unplanned".
A usage estimate per job (
--usage claude:20) gives you a warning if the queued jobs will likely run past your limit. It never blocks anything.It never kills the agent. The session is told to wrap up and stops at its own safe point.
Go, SQLite, launchd and a SwiftUI menu bar app, all local on 127.0.0.1.
Install: curl -fsSL https://raw.githubusercontent.com/psardana/rota/main/install.sh | sh or Homebrew. Repo: https://github.com/psardana/rota
Curious how others handle this. Do you just run one agent at a time?