/agent-traffic-control:opus-ratelimit-fanout-retry-on-sonnet-throttled-wavesfrom agent-traffic-control
When a large Workflow/Agent fan-out (dozens of parallel subagents on Opus) mass-fails with "Server is temporarily limiting requests (not your usage limit)" / HTTP 429 — most agents dying, a few that finished before the burst surviving — recover by re-running the SAME fan-out on Sonnet and throttled into sequential waves (not one wide burst). Use when: (1) a Workflow returns far fewer results than dispatched and the failures all read "Rate limited" / 429 with "not your usage limit"; (2) you launched 20+ concurrent Opus subagents in one shot; (3) the task is well within Sonnet's range (triage, review, code-tracing, classification). Sonnet is a SEPARATE capacity pool, so it sidesteps the Opus-specific server throttle; the orchestrator/synthesis can stay on Opus.
Ships in agent-traffic-control. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A wide parallel fan-out (Workflow parallel()/pipeline() or many concurrent Agent
calls) launched on Opus mass-fails with a server-side capacity throttle, not your
account quota. The whole fan-out collapses to a handful of results — only the agents that
happened to finish before the burst survive.
API Error: Server is temporarily limiting requests (not your usage limit) · Rate limited → HTTP 429.parallel() over 20–50 items, or a single
message with dozens of Agent calls). The wider the simultaneous burst, the worse.StructuredOutput loop (that's a schema-payload failure under
the same storm — see the companion skill workflow-schema-agents-empty-loop-under-ratelimit).
This skill is about the mass-429 capacity failure mode and the cheapest recovery.Two independent levers; apply both on the retry:
Move the fan-out agents to Sonnet. Set model: 'sonnet' on the agent() calls
(Workflow) or model: "sonnet" on the Agent tool. Sonnet draws from a separate
capacity pool, so it does not contend for the throttled Opus capacity. Keep the
orchestrator and the final synthesis/judge on Opus — only the fan-out workers move.
Triage / review / code-tracing / classification fan-outs are well within Sonnet's range.
Throttle the burst into sequential waves. Instead of one N-wide parallel(), loop
in chunks of ~8 (parallel within a wave, barrier between waves). This spaces the
request bursts so you never present 50 simultaneous requests again:
const CHUNK = 8
const results = []
for (let i = 0; i < ITEMS.length; i += CHUNK) {
const slice = ITEMS.slice(i, i + CHUNK)
log(`wave ${i/CHUNK+1}: ${slice.join(', ')}`)
const r = await parallel(slice.map((it) => () =>
agent(prompt(it), { model: 'sonnet', schema: SCHEMA })))
results.push(...r)
}
It trades wall-clock (waves run serially) for reliability. Re-running is cheap because a Workflow with the same script + args returns cached results for the agents that already succeeded — but a fresh run on Sonnet+waves is usually simpler than resuming.
ITEMS.filter(n => !results.some(r => r.number===n))
is empty), where the Opus burst returned only a few.First run: ~50 investigator agents in one pipeline() burst, all Opus → nearly all died
with "Rate limited · 429 · not your usage limit"; only a handful (that finished before the
storm) returned. Re-ran the identical fan-out with model: 'sonnet' in waves of 8 →
all ~50 completed, 0 missing, and the adversarial-verify pass still flipped the couple of
dismissals it should. Final synthesis/cut-line stayed on Opus. Net cost of the
diagnosis+retry: minutes.
parallel() swallows a thrown thunk to null (never rejects), so a partial storm shows
up as null holes, not an exception — always .filter(Boolean) and compare count to
dispatched to detect it.StructuredOutput schema, the storm
also triggers the empty-args validation loop — drop to free-text return for the heaviest
agents (see the companion skill workflow-schema-agents-empty-loop-under-ratelimit).{"type":"result"} lines from
subagents/workflows/<run>/journal.jsonl) when you'd rather salvage the survivors than
re-run the whole fan-out.agent() model override (quality-patterns).workflow-schema-agents-empty-loop-under-ratelimit (the schema-loop
variant of the same storm).What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub wan-huiyan/agent-traffic-control --plugin agent-traffic-control118 skills in this plugin
/agent-refusal-with-evidence-beats-literal-complianceA dispatched agent that does exactly what you asked can ship a defect you would
have stopped yourself, because it can see something at the worksite that you
could not see when you wrote the brief. Use when: (1) you are writing a brief
that prescribes a specific fix, threshold, wording or value rather than the
outcome you want; (2) an agent reports that it did not do what you asked and
you are deciding whether that is insubordination or judgement; (3) an agent
asserts "this is fine" or "not needed" with no measurement behind it; (4) you
are reviewing overnight output and want to know which decisions were checked
and which were assumed. Two halves, and both are needed: give the agent
explicit permission to satisfy the INTENT of an instruction while refusing its
letter, and REQUIRE the evidence with the refusal — what it built or measured,
what that showed, what it did instead. Evidence is the whole difference between
a refusal you can bank and one you have to re-litigate. Four agents correctly
declined an instruction in a single run; one built the suggested fix, measured
that it turned a silent safe refusal into a permanently red pipeline, and
reverted it unpushed.
/auto-merge-rearms-while-agent-live-kill-then-disarm-verifyDisarming auto-merge on a PR whose agent is still running does not hold it —
the agent re-arms within minutes and the PR merges, because arming is a step in
the agent's brief and disarming is not an instruction to the agent at all. Use
when: (1) you want to STOP a pull request from merging that an agent opened and
armed, for review, for a rethink, or because it is landing into a queue you are
trying to drain; (2) a PR you disarmed merged anyway; (3) you are telling agents
which PRs are on hold and want the hold to be enforced rather than announced;
(4) you are about to run `gh pr merge --disable-auto` and have not decided what
to do about the agent. The order is KILL THE AGENT FIRST, THEN DISARM, THEN
VERIFY the disarm by reading `autoMergeRequest` back — a disarm you did not read
back is not a hold. The stronger form needs no ordering at all: convert the PR
to a draft with `gh pr ready --undo`. A draft cannot merge whatever any agent
does to it, so the hold survives an agent you missed, an agent that restarts,
and an agent you did not know about.
/batch-member-cites-a-path-only-a-non-member-addsYou wrote something correct that the default reader cannot reach: a batch member citing a
path only a NON-member adds, or a rule, ruling or ledger sitting on an unlanded branch.
/batch-merge-subject-is-not-evidence-a-member-landedYou are about to close, delete the branch of, or mark as landed a pull
request because a batch, roll-up or merge-train commit on the target branch
names it in the subject line, and because the member's own commits all
predate that merge by wall clock. Neither of those is evidence. A batch
branch is assembled at some moment BEFORE it merges, so anything the member
pushed after assembly is outside it, and the subject records INTENT at
assembly time rather than CONTENT at merge time. Use before closing a
member, when an ancestry check against a squashed batch says no, or when a
member's branch still shows commits ahead of the target. Compare file
content against the target branch instead, expecting exactly one legitimate
difference: the shared aggregate file every member appends to.
/check-a-stale-branch-is-not-undoing-newer-main-workA branch built on an out-of-date main is about to merge, or has merged, and may undo work
that landed since. Use when a green, conflict-free PR deletes files you never touched,
newer values or a whole redesign vanish after a sibling PR merged, rows of a shared ledger
(tracker, registry, CHANGELOG) disappear or revert, or when `git diff main...HEAD` or a
reviewer says your small PR touches dozens of files you did not change.
/ci-leg-skipping-moves-minutes-it-does-not-remove-themYou are about to propose, price or approve a CI cost saving that works by
making a job or matrix leg SKIP on pull requests — a path filter, a safe
list, a changed-files gate, an exemption list. Check first whether the
pipeline runs a complement or backstop on merge, on push, or nightly:
many do, and then the legs a pull request skipped are exactly the legs some
later run executes, so a branch that goes green once and merges bills the
same total either way and the wall clock does not move at all. Use when
pricing a filter change, when a percentage saving is quoted with no basis,
or when choosing between filtering legs and batching pull requests. The
question that separates money from bookkeeping is whether the change
removes RUNS or merely moves LEGS.