parallel-subagent-fanout-rate-limit-recover-from-disk

parallel-subagent-fanout-rate-limit-recover-from-disk is a skill for Claude Code from wan-huiyan/agent-traffic-control. It costs 325 tokens per session (1,615 once invoked), scanned A, original, MIT.

A recovery guide for large batches of coding subagents that hit server request limits while writing results to disk. Subagents are helper agents that perform smaller tasks in parallel.

In plain words
What is it for?
Use it to check files on disk, identify which tasks really completed, retry only missing work, and reduce concurrency for later batches.
Why use it?
It prevents repeated work when an agent reports failure even though it already created its output file.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: mentions subagents; mentions Claude Code.

Part of the agent-traffic-control plugin — 105 skills shipped together

Good fit Use it to check files on disk, identify which tasks really completed, retry only missing work, and reduce concurrency for later batches.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/wan-huiyan/agent-traffic-control/parallel-subagent-fanout-rate-limit-recover-from-disk
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add wan-huiyan/agent-traffic-control --skill parallel-subagent-fanout-rate-limit-recover-from-disk
Clone the repo
git clone --depth 1 https://github.com/wan-huiyan/agent-traffic-control

Made for: Claude Code.

Or install agent-traffic-control, the plugin that ships this one along with the rest of its 105 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for parallel-subagent-fanout-rate-limit-recover-from-disk

README.md
[![agentmods](https://agentmods.dev/badge/skills/wan-huiyan/agent-traffic-control/parallel-subagent-fanout-rate-limit-recover-from-disk/github.svg)](https://agentmods.dev/skills/wan-huiyan/agent-traffic-control/parallel-subagent-fanout-rate-limit-recover-from-disk)
Your own site
<a href="https://agentmods.dev/skills/wan-huiyan/agent-traffic-control/parallel-subagent-fanout-rate-limit-recover-from-disk"><img src="https://agentmods.dev/badge/skills/wan-huiyan/agent-traffic-control/parallel-subagent-fanout-rate-limit-recover-from-disk/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for parallel-subagent-fanout-rate-limit-recover-from-disk

Your own site · 80×15
<a href="https://agentmods.dev/skills/wan-huiyan/agent-traffic-control/parallel-subagent-fanout-rate-limit-recover-from-disk"><img src="https://agentmods.dev/badge/skills/wan-huiyan/agent-traffic-control/parallel-subagent-fanout-rate-limit-recover-from-disk.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 325 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,615 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00325 $0.01615
Opus 5 $0.00162 $0.00807
Sonnet 5 $0.00065 $0.00323
Haiku 4.5 $0.00032 $0.00161

Measured 12d ago against content hash e89024fb7a5d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

parallel-subagent-fanout-rate-limit-recover-from-disk scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/agent-traffic-control/skills/parallel-subagent-fanout-rate-limit-recover-from-disk/SKILL.md · 118 lines

How it starts

The opening of the file, as written. The whole thing — 118 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Parallel subagent fan-out: rate limit, and recover from disk not return status

Problem

You dispatch a large fan-out of subagents in one message — each reads a chunk, does work, and writes an output file — to maximize parallelism. Two things go wrong:

  1. Above a low concurrency ceiling the API returns "Server is temporarily limiting requests (not your usage limit) · Rate limited" for most of the batch.
  2. When you go to retry the "failed" ones, the agents' return status is misleading: many agents that returned a rate-limit/terminal error had already completed their work and written their output file — the error hit on the final summary turn, after the side effect.

Re-running based on the agent return status re-does work that's already on disk (wasted tokens) or, worse, you trust "20 failed" and redo all 20 when 14 actually succeeded.

Context / Trigger Conditions

  • Dispatching >~5-6 concurrent general-purpose Agent/Task subagents (or a Workflow fan-out) in a single message.
  • Result array peppered with API Error: Server is temporarily limiting requests (not your usage limit) · Rate limited. Some agents show tool_uses: 14-24, subagent_tokens: 0 — they did work but the final return failed.
  • Each subagent's contract is to write a file (chunk JSON, transformed doc, etc.) at a known path.

Root cause

  1. Concurrency, not quota. Too many simultaneous subagent inference streams trip a server-side throttle that is explicitly "not your usage limit." A smaller batch (≤4-5) stays under it.
  2. Side effect precedes the failing turn. A subagent does Read→…→Write (the deliverable) and then emits a final summary turn. The rate-limit/terminal error lands on that last turn, so the file is already on disk even though the agent "errored."

Solution

  • Batch at ≤4-5 concurrent for large fan-outs. Dispatch batch, wait, dispatch next. (One validation batch first to prove the prompt, then scale in small batches.)
  • To decide retries, CHECK DISK, not the agent return. Enumerate the expected output paths; re-dispatch only the chunks whose files are missing or empty:
    for n in $(seq -w 1 N); do
      f="out/.chunk_${n}.json"
      [ -f "$f" ] && [ -s "$f" ] || echo "MISSING $n"
    done
    
  • Make each subagent write to a deterministic absolute path (so this disk check is possible) and validate the file parses before counting it done.
  • If the run is paused/resumed across sessions, commit the produced files (or rely on a persistent working dir) so the expensive partial work survives.

Read the full file on GitHub · 118 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 118 lines · 325 tokens per session scan A e89024fb7a5d

Subscribe to this mod's changes

parallel-subagent-fanout-rate-limit-recover-from-disk is a skill published in the GitHub repository wan-huiyan/agent-traffic-control (3 stars, last pushed today), licensed MIT. It adds 325 tokens to every session and 1,615 once invoked, about $0.0016 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

codex-coplan

Bring in an external model (Codex) to co-develop a plan — both models draft independently, align on disagreements, and merge into one plan. Load this only when the user explicitly names Codex (e.g. "let's discuss this with Codex," "what does Codex think about this approach") — don't auto-trigger just because a plan…

jiayx01/codex-claude-skills · 92 tokens

codex-orchestrator

Delegate execution tasks to Codex (Claude plans and reviews). Load this only when the user names Codex explicitly — no matter how big the task is, if the user hasn't mentioned Codex, do it yourself.

jiayx01/codex-claude-skills · 49 tokens

good-bad-ugly

Use when the user asks to "orchestrate", "conduct", invoke "good bad ugly" / "gbu", or tackle a large multi-part coding task (audits, refactor sweeps, multi-feature sessions, "clean this up and fix everything") — anything too big for one linear pass. Runs the tiered orchestration workflow: The Good (brain) plans and…

XyndoX/good-bad-ugly · 131 tokens

orchestrate

Use only when the user explicitly types /orchestrate:orchestrate to decompose a large task, spawn a tree of parallel worker/subplanner/verifier subagents, and collect structured handoffs. Do not invoke autonomously.

odysseus0/claude-orchestrate · 54 tokens

api-testing

HTTP API testing for TypeScript (Supertest) and Python (httpx, pytest). Test REST APIs, GraphQL, request/response validation, authentication, and error handling.

secondsky/claude-skills · 39 tokens

bun-test-coverage

Use for test coverage with Bun, --coverage flag, lcov reports, thresholds, and CI integration.

secondsky/claude-skills · 26 tokens