Claude Code Subagents in Practice: Rewriting 20 Blog Posts in Parallel
💬 hippo: This is a real field log of using Subagents to rewrite blog posts in parallel. Moving from writing one post at a time to running 20 concurrently delivered a clear speedup—along with a few rate-limit pitfalls along the way.
1. Background: Why Use Subagents?
I had 27 Claude Code Official Docs Breakdown posts that needed a full rewrite. The original drafts had major issues:
- Mostly generic, boilerplate filler
- Missing code examples and configuration schemas from the official guides
- Empty platitudes instead of concrete technical explanations
The problem with writing sequentially: Every post bloats the conversation context. By the 10th article, Claude starts forgetting the template rules and output quality degrades.
Why Subagents help:
- Each Subagent gets its own isolated context window
- Tasks run concurrently without interfering with each other
- The main thread only waits for completion summaries
2. Subagent Configuration
2.1 Create the Article Template
Define the rewrite rubric in .claude/templates/doc-rewrite-template.md:
1 | # Claude Code Official Docs Breakdown Template |
2.2 Define the Custom Subagent
Create the custom Subagent definition in .claude/agents/doc-writer.md (YAML front matter is required—Claude Code uses name and description to discover and route to the agent):
1 | --- |
3. Launching Subagents in Parallel
3.1 Launch a Single Subagent
Use the Agent tool to start a background task:
1 | Agent "Rewrite sub-agents.md" |
3.2 Launch Multiple Subagents in Parallel
The key: Invoke multiple Agent tool calls in a single message to get true parallel execution:
1 | ┌─────────────────────────────────────────────────────┐ |
Out of the 27 Official Docs Breakdown posts, I first polished 4 reference examples by hand (claude-quickstart, claude-setup, how-claude-code-works, hooks), then launched 23 Subagents in parallel for the remaining 23 posts.
4. Results
4.1 First-Pass Parallel Run (23 Posts)
| Status | Count | Posts |
|---|---|---|
| ✅ Succeeded on first pass | 17 posts | sub-agents, skills, mcp, cli-reference, settings, best-practices, desktop-quickstart, github-actions, claude-overview, vs-code, jetbrains, legal-and-compliance, slack, claude-code-on-the-web, third-party-integrations, remote-control, browser-control |
| ❌ Rate-limited (retried in smaller batches) | 6 posts | troubleshooting, memory, common-workflows, gitlab-ci-cd, features-overview, scheduled-tasks |
4.2 Single-Post Output Quality
Taking sub-agents.md as an example:
| Metric | Target | Actual |
|---|---|---|
| Code blocks | ≥2 | 6 (YAML, Bash, CLI JSON) |
| Config examples | ≥1 | 3 (complete subagent configs) |
| Tables | ≥1 | 3 (file locations, config fields, built-in comparison) |
| Length | ≥1,000 chars | ~2,000+ chars |
5. Pitfalls Encountered
Pitfall 1: API Rate Limits
Symptom: Launching 20+ Subagents simultaneously triggered HTTP 429 rate-limit errors.
1 | API Error: 429 {"error":{"code":"1302","message":"Your account has reached the rate limit"}} |
Root cause: Every Subagent makes independent API calls; high concurrency quickly trips account rate limits.
Fix:
- Lower concurrency (3–5 Subagents per batch is the sweet spot)
- Add a cooldown gap between batches
- Or accept partial failures and retry the failed slice afterward
Pitfall 2: Every Subagent Triggers the Stop Hook
Symptom: I had a Stop Hook configured to send Feishu notifications, and got blasted with 20+ alerts at once.
Root cause: Every Subagent triggers the Stop Hook upon completion, with transcript_path pointing to that subagent’s own session transcript.
Impact: The notification payload displayed subagent task prompts like "Rewrite xxx.md" instead of the main session’s user prompt.
Fix:
- Temporarily disable the
StopHook before running large parallel batches if you want to avoid notification noise - Or treat it as expected behavior
Pitfall 3: No Way to Cancel Running Subagents
Symptom: When I wanted to abort all running Subagents mid-flight, there was no built-in way to recall or cancel background tasks.
Root cause: Once dispatched, background Subagents execute independently until they terminate on their own.
Fix:
- Wait for them to finish naturally (rate-limited ones fail fast)
- Close the current session (background Subagents do not carry over into a new session)
6. Efficiency Comparison
| Approach | 27 Posts | Notes |
|---|---|---|
Sequential (/clear per post) |
~27 sessions | Must re-read the template every time; slow turnaround |
| Parallel Subagents (5 per batch) | ~6 sessions | Main thread just waits; 4–5x faster overall |
| Parallel Subagents (20+ at once) | 1 session | Hits API rate limits and lowers first-pass success rate |
Best practice: Run 3–5 posts per batch with a 2–3 minute interval between batches. You get a 3–5x throughput boost without tripping API rate limits.
7. Complete Setup
Bootstrap Commands (Main Thread)
1 | # Create configuration directories |
1 | // Example: launch 5 Subagents concurrently |
8. Summary
When Subagents shine:
- ✅ Batch-processing similar tasks (such as rewriting a series of articles)
- ✅ Workloads that benefit from isolated context windows
- ✅ Tasks that can run completely independently
When to avoid Subagents:
- ❌ Tasks with tight sequential dependencies
- ❌ Workflows requiring frequent back-and-forth confirmation
- ❌ Tight API quotas where parallel calls will trigger rate limits
Bottom line: Trade one session’s wait time for a 3–5x jump in task throughput.
Related Posts
- Official Docs Breakdown: Subagents — Complete breakdown of the official Subagents documentation
- Claude Code Hooks in Practice — Configuring completion-notification hooks
Last updated: 2026-03-25




