Subagents

AI-generated summary of reporting by Simon Willison’s Weblog. Read the original for the full story.

Why it matters

Subagents let coding agents like Claude Code handle bigger tasks without exhausting their context window, and can run cheap parallel models like Claude Haiku to speed up multi-file work.

Read this as

This article from Simon Willison's blog explains 'subagents', a technique where an AI coding assistant sends out smaller copies of itself to do work. Each copy gets its own fresh working memory, so the main assistant doesn't fill up its limited memory (about 1,000,000 tokens at most) while digging through a big codebase. Several AI coding tools, including Claude Code and OpenAI Codex, already support this. It mainly affects programmers who use AI assistants for large coding projects.

Subagents have become a standard pattern across major coding agents including Claude Code, OpenAI Codex, Cursor and Gemini CLI. They let the main agent delegate exploration, testing or debugging to fresh instances that consume none of the parent's context budget, with cheap models like Claude Haiku usable for parallel work. Teams using these tools should adopt subagent prompting for multi-file tasks; vendors without subagent support now lag on large-project efficiency.

Willison explains subagents as tool-call-style dispatches: a parent agent spawns a fresh context window with a self-generated prompt, preserving root context. Context limits have stayed around 1,000,000 tokens for two years, with benchmarks showing better quality below 200,000. Patterns include sequential Explore agents, parallel dispatch for independent file edits, and specialist agents (code reviewer, test runner, debugger) with custom system prompts. He cautions against overusing specialists; the core value is context preservation.

Read the original

This summary exists to save you time, not to replace the source.

Key terms

Claude Code Claude Haiku OpenAI Codex Gemini CLI Cursor Simon Willison

Was this summary useful?

One click, anonymous. It tells us which summaries to re-run.

Related reading