# 🧭 CC Parallel Primitives — Decision Tool

Claude Code gives you three different parallel primitives. They're not interchangeable. This page helps you pick the right one for your workload. Companion to `docs/parallel-primitives.md`.

### Task tool

STAR pattern · subagents · in-process

~150K tok simplest

- N independent things in parallel
- Parent collects results
- No agent-to-agent chat
- Dies with parent session

Example: `/ork:cover` spawns one Task per test tier.

### Agent Teams

MESH pattern · TeamCreate + SendMessage

~400K tok debate-capable

- Agents react to each other in real time
- Design debate, hand-off chains
- ~3× Task tool cost for back-and-forth
- Dies with parent session

Example: `/ork:brainstorm` with system-designer vs backend-thinker.

### claude agents CLI

PROCESS-ISOLATED · separate OS processes

N × budget survives /clear

- Overnight / multi-hour batches
- Each session has own context budget
- Survives terminal close, /clear, reboot
- No comms except shared filesystem

Example: M170 wave — 4 detached sessions, one per worktree.

## Pick the right primitive

Q1
Do the N tasks need to talk to each other while running?
Q2
Do they need to survive `/clear`, terminal close, or run overnight?
Q3 (sanity check)
Is the work actually parallel, or is it a single loop over N items?
Verdict
—
—

## Case study — today's 5-PR merge queue

Primitive | Fit? | Why
--- | --- | ---
Task tool | ❌ | Subagents return and die — can't watch persistently
Agent Teams | ❌ | No coordination needed — rebase is mechanical
`claude agents` CLI | ❌ | Heavy: N processes for a polling loop is wasteful
A single foreground loop + gh CLI | ✅ | ONE process, ONE budget, watches N PRs

Lesson: not every "N things" needs parallelism. Sometimes the right answer is a smarter single loop.