Agent Upstart

Cool things people are building with agents — and practical help getting the most out of them.

Playbooks · Coding tasks · last verified 2026-10-25

Run parallel research with Claude Code subagents

For a solo developer × running independent investigations in parallel × Claude Code subagents, so three lines of research finish in one session without flooding the main conversation.

Before you start

You need a Claude Code session in a project you can read freely. A subagent is a Markdown file with YAML frontmatter: the file's body becomes the subagent's system prompt, and the frontmatter says when Claude should use it and what it may touch. Only two frontmatter fields are required — name and description — and a file missing either one is skipped without a visible error, which is the first failure mode to know about. Project subagents live in .claude/agents/ and can be checked into version control; user subagents live in ~/.claude/agents/ and work across projects. This page was not run inside Claude Code this run: the file shapes and limits below come from Claude Code's own subagents documentation, read this run, not from a completed session.

The rule for whether parallel is even the right shape: the docs' parallel pattern works when the research paths do not depend on each other. If path B needs path A's answer, that is a chain, not a parallel run, and running it in parallel buys confusion instead of speed.

What "done" looks like

At the end of one session you have three short summaries — one per path — each naming the files it read and the finding it stands behind, and a synthesis that says where they agree, where they conflict, and what you still need to check yourself. The main conversation holds the summaries, not the thousands of lines the exploration read. No code has changed unless you asked a subagent that may write to change it.

Steps

  1. Split the investigation into independent paths, on paper, before you spawn anything. Write one sentence per path: what it must answer, and what it must not need from the other paths. If you cannot write a path's question without referencing another path's answer, merge them or sequence them — do not parallelize a dependency.
  2. Start with the built-in subagents before writing any file. Claude Code already ships Explore (read-only, for searching and analyzing a codebase), Plan (read-only, for research during plan mode), and General-purpose (for complex work that both explores and changes things). Asking Claude to use Explore for a codebase question is often the whole job; a custom file earns its place only when you keep spawning the same kind of worker with the same instructions.
  3. When a custom worker repeats, write one small file for it. A code reviewer, for example, in .claude/agents/code-reviewer.md: frontmatter with a name, a description that says exactly when Claude should delegate to it ("Use when reviewing a change for correctness and test coverage, before it is merged"), and a tools list that matches the job — Read, Grep for a reviewer that must not change anything. The body is the reviewer's instructions: what to check, what a finding must cite (file and line), and that it reports findings instead of fixing them. Keep the description short: when the combined descriptions of your custom subagents pass 15,000 tokens, Claude Code warns at startup, and every description costs context on every session whether that subagent runs or not.
  4. Give the cheap model the read-only work. A subagent's model field takes sonnet, opus, haiku, fable, a full model ID, or inherit. Exploration that only reads files is the natural place for haiku. Two cost facts from the docs that shape this choice: a subagent's requests count toward the same usage limits as the main conversation, so parallel is not free — it is faster, not cheaper; and a subagent starts with a fresh context window, so it does not see your conversation history unless the delegation message carries what it needs.
  5. Ask for all of the paths in one message, then let Claude synthesize. Name each path and its question, and say the paths are independent. Each subagent works in its own context and returns only its summary; Claude then combines them. Your job at this step is the synthesis check, not re-reading everything: where do two summaries disagree, where does one cite a file the other did not read, and which finding would change your decision if it were wrong?
  6. Verify one finding per path by hand before acting on it. Open the cited file and check the claim. This matters more than usual with subagents, because a subagent reads files, web pages, and command output you never reviewed, and text from those sources can carry instructions aimed at the main conversation. Claude Code scans each report for that shape of text and marks it, but the scan does not judge whether content is malicious — it only flags the shape. A finding that would make you run a command, change a permission, or merge a change gets checked in the file itself, not on the report's word.
  7. Check the file actually loaded before you trust a quiet session. A subagent file with a misspelled frontmatter field is not rejected with an error — Claude Code ignores a field it does not recognize, silently. A file with no name or no description is skipped silently, and two files in the same agents directory declaring the same name load only one of them, chosen by filesystem read order. If Claude never delegates to your new subagent, check the file before concluding the description was wrong: run claude plugin validate against the agents directory, or run Claude Code with --debug and search the debug log for the unrecognized-field note.

Check the subagents' work

What can go wrong

Limits

Verification

Checked 2026-10-25. This page was not run inside Claude Code this run; its claims rest on Claude Code's own subagents documentation, read this run. Sources: Create custom subagents — Claude Code Docs (built-in Explore, Plan, and General-purpose agents; frontmatter with name and description required; project and user agent directories; model aliases and the haiku cost option; the parallel-research pattern for independent paths; the 15,000-token description warning; the 20-concurrent-subagent limit; silent skipping of malformed files; output scanning for instruction-shaped text). Omitted: no claim is made that a particular custom subagent file was tested in a live session, and no usage cost is quoted, because the docs state the limit-sharing rule without a price.

Back to: Coding playbooks hub · Also: Review a pull request with a coding agent