Claude Code Subagents for Large Repos
Claude Code Subagents for Large Repos with source-backed guidance, implementation steps, pitfalls, SEO FAQ, and practical checklists for Claude Fable 5 teams.
This guide is for readers evaluating claude code subagents with production or serious workflow intent. It avoids unsourced community claims and points readers back to official docs where behavior can change.
Key takeaways
- Use official docs as the source of truth before deployment.
- Evaluate Fable 5 on real tasks, not demos.
- Track cost, latency, refusals, and final task success together.
- Use internal routing so premium models handle premium work.
When to delegate research
For developers, when to delegate research should be treated as a measurable part of the claude code subagents decision. Coding workflows should be measured against repository outcomes: passing tests, smaller diffs, fewer review comments, and clear rollback notes. Write down the assumption, source, owner, and acceptance test before using it in production.
In practice, start with a baseline run, then change one variable at a time. For claude code subagents, useful variables include model choice, prompt length, tool availability, cache reuse, output budget, and fallback policy. A small table of results is more useful than a long anecdote.
Custom subagent files
For developers, custom subagent files should be treated as a measurable part of the claude code subagents decision. Coding workflows should be measured against repository outcomes: passing tests, smaller diffs, fewer review comments, and clear rollback notes. Write down the assumption, source, owner, and acceptance test before using it in production.
In practice, start with a baseline run, then change one variable at a time. For claude code subagents, useful variables include model choice, prompt length, tool availability, cache reuse, output budget, and fallback policy. A small table of results is more useful than a long anecdote.
| Metric | Why it matters | Target |
|---|---|---|
| Task success | Did the model solve the real problem? | Pass/fail plus reviewer notes |
| Token cost | Shows effective price after retries and cache hits. | Input, output, cache write, cache hit |
| Latency | Determines whether the workflow can be interactive. | P50 and P95 |
| Stop reason | Separates refusals, max token stops, and normal completion. | Logged per request |
| Fact to verify | Why it matters |
|---|---|
claude-fable-5 | Use the current model ID in configuration and tests. |
| 1M context / 128K output | Large capacity does not remove the need for context discipline. |
| $10 input / $50 output per MTok | Output length and retries drive real cost. |
| Prompt cache and batch options | Reusable context and offline work can reduce effective cost. |
| Refusal and fallback behavior | Safety paths must be visible in logs, UI, and support workflows. |
Tool access per subagent
For developers, tool access per subagent should be treated as a measurable part of the claude code subagents decision. Tool and MCP integrations should use narrow permissions, explicit schemas, auditable tool results, and a deny-by-default posture for sensitive actions. Write down the assumption, source, owner, and acceptance test before using it in production.
In practice, start with a baseline run, then change one variable at a time. For claude code subagents, useful variables include model choice, prompt length, tool availability, cache reuse, output budget, and fallback policy. A small table of results is more useful than a long anecdote.
Keeping main context clean
For developers, keeping main context clean should be treated as a measurable part of the claude code subagents decision. The model specs describe a 1,000,000-token context window and up to 128,000 output tokens, but teams still need context selection, summarization, and max_tokens controls. Write down the assumption, source, owner, and acceptance test before using it in production.
In practice, start with a baseline run, then change one variable at a time. For claude code subagents, useful variables include model choice, prompt length, tool availability, cache reuse, output budget, and fallback policy. A small table of results is more useful than a long anecdote.
Implementation checklist
- Confirm the current official docs for claude code subagents before launch.
- Record the model ID, provider, region, and pinned version in configuration.
- Run at least five production-like test tasks before changing defaults.
- Log input tokens, output tokens, stop_reason, retries, latency, and final outcome.
- Keep a cheaper fallback route for routine work and a manual review path for refusals.
- Review cost after the first 50 to 100 real requests, not after a single demo.
Concrete next steps
- Start with repository exploration and a written plan.
- Ask for small diffs tied to one acceptance test.
- Run tests or document why tests could not run.
- Review diffs before merging agent output.
FAQ
Is claude code subagents only an SEO topic?
No. The keyword maps to a real implementation decision: model choice, cost, tool design, safety handling, or workflow architecture.
What should I verify first?
Verify the current official docs, the model ID, pricing, and your own eval results.
Sources
- code.claude.com - referenced for current model, API, pricing, workflow, or integration details.
- code.claude.com - referenced for current model, API, pricing, workflow, or integration details.