Skip to content
b! brat ★ GitHub

← home · compare

brat vs GNU parallel

Shell-level parallel execution

GNU parallel is one of the most quietly important tools in Unix. You can absolutely use it to fan out coding-agent invocations, and many people start there. What you give up by stopping at parallel is everything above the process boundary — no event log, no resumability, no merge queue, no shared lock discipline. brat is what you reach for when parallel got you 80% there and the last 20% is keeping fifty crashed sessions sorted.

feature brat GNU parallel winner
Scope Multi-agent harness with state Parallel shell execution tie
Crash safety WAL replay; sessions survive process death None — crashed jobs are lost unless you wrap them brat
Audit trail Every state change is a Grite event Whatever you redirect stdout to brat
Lock discipline TTL-based resource leases flock if you remember to use it brat
Merge queue Refinery role Not in scope brat
Install footprint Rust binary (brat) + Gritee Single perl script, almost everywhere GNU parallel
Learning curve Convoys, tasks, witnesses parallel ::: args GNU parallel
Right tool for Long-running agent fleets on a real repo Stateless parallel jobs over a list tie

pick brat when

  • You need durable state across crashes, not just a process pool
  • You need a merge queue that runs CI per task and lands work in order
  • You're coordinating agents that share a working tree and need lock leases
  • You want a structured task model (convoy → task → session) instead of bare shell commands
  • You need an audit log of what each agent did and when

pick GNU parallel when

  • Your job is a one-shot fan-out with no shared state and no merge step
  • You don't want to install or learn anything new
  • You're scripting around tools that don't have brat adapters
  • The whole orchestration is one bash file and you like it that way

still deciding?

These are not zero-sum. Run brat for the agent fleet on your main repo, keep GNU parallel for what it's already good at, and let the tools earn the work they do best.