{"id":"15-subagents","number":15,"slug":"subagents","title":"Subagents: delegate to a fresh context","short":"Subagents","module":"Scaling up","summary":"A subagent is a fresh copy of your agent, sent off with its own context window to do messy work and report back only the answer. Used for context control, not role-play, subagents keep your main session sharp: exploring, running noisy tests, reviewing with fresh eyes, or trying several designs at once.","voice":"Eric","scenes":[{"template":"title","chapter":"Intro","narration":"What if your agent could clone itself, send the clone off to do the messy work, and get back just the answer? That's a subagent, and it's one of the best tools you have for keeping context clean.","params":{"kicker":"Lesson 15","module":"Module 4 · Scaling up","title":"Subagents: delegate to a *fresh context*","subtitle":"Send a clone to do the messy work. Keep only the answer.","bubble":"I'll send a copy of me.","mood":"happy"},"start":0.5,"dur":12.511,"words":[{"text":"What","s":0.8,"e":0.96},{"text":"if","s":1.04,"e":1.12},{"text":"your","s":1.2,"e":1.28},{"text":"agent","s":1.36,"e":1.68},{"text":"could","s":1.76,"e":1.92},{"text":"clone","s":2.08,"e":2.24},{"text":"itself,","s":2.32,"e":3.04},{"text":"send","s":3.12,"e":3.28},{"text":"the","s":3.36,"e":3.4},{"text":"clone","s":3.44,"e":3.68},{"text":"off","s":3.76,"e":3.84},{"text":"to","s":3.92,"e":4},{"text":"do","s":4.04,"e":4.08},{"text":"the","s":4.16,"e":4.24},{"text":"messy","s":4.32,"e":4.56},{"text":"work,","s":4.64,"e":5.12},{"text":"and","s":5.16,"e":5.2},{"text":"get","s":5.28,"e":5.44},{"text":"back","s":5.56,"e":5.68},{"text":"just","s":5.76,"e":6},{"text":"the","s":6.08,"e":6.16},{"text":"answer?","s":6.24,"e":6.88},{"text":"That's","s":7.2,"e":7.52},{"text":"a","s":7.6,"e":7.68},{"text":"subagent,","s":7.76,"e":8.64},{"text":"and","s":8.68,"e":8.72},{"text":"it's","s":8.76,"e":8.88},{"text":"one","s":8.96,"e":9.04},{"text":"of","s":9.08,"e":9.12},{"text":"the","s":9.24,"e":9.36},{"text":"best","s":9.48,"e":9.6},{"text":"tools","s":9.76,"e":9.92},{"text":"you","s":10,"e":10.08},{"text":"have","s":10.24,"e":10.4},{"text":"for","s":10.48,"e":10.56},{"text":"keeping","s":10.64,"e":10.88},{"text":"context","s":10.96,"e":11.44},{"text":"clean.","s":11.52,"e":12.16}]},{"template":"quote","chapter":"What it is","narration":"Simon Willison's definition: when a coding agent uses a subagent, it effectively dispatches a fresh copy of itself to achieve a specified goal, with a new context window that starts with a fresh prompt.","params":{"text":"It effectively dispatches a *fresh copy of itself* to achieve a specified goal, with a new context window that starts with a fresh prompt.","who":"Simon Willison","role":"Agentic Engineering Patterns","src":"Subagents"},"start":13.011,"dur":13.463,"words":[{"text":"Simon","s":13.311,"e":13.711},{"text":"Willison's","s":13.791,"e":14.271},{"text":"definition:","s":14.551,"e":15.471},{"text":"when","s":15.551,"e":15.631},{"text":"a","s":15.671,"e":15.711},{"text":"coding","s":15.791,"e":16.031},{"text":"agent","s":16.191,"e":16.511},{"text":"uses","s":16.591,"e":16.831},{"text":"a","s":16.911,"e":16.991},{"text":"subagent,","s":17.071,"e":17.951},{"text":"it","s":17.991,"e":18.031},{"text":"effectively","s":18.111,"e":18.671},{"text":"dispatches","s":18.911,"e":19.311},{"text":"a","s":19.391,"e":19.471},{"text":"fresh","s":19.551,"e":19.791},{"text":"copy","s":19.871,"e":20.191},{"text":"of","s":20.231,"e":20.271},{"text":"itself","s":20.351,"e":20.751},{"text":"to","s":20.831,"e":20.911},{"text":"achieve","s":20.991,"e":21.231},{"text":"a","s":21.311,"e":21.391},{"text":"specified","s":21.671,"e":21.951},{"text":"goal,","s":22.031,"e":22.751},{"text":"with","s":22.791,"e":22.831},{"text":"a","s":22.911,"e":22.991},{"text":"new","s":23.071,"e":23.151},{"text":"context","s":23.231,"e":23.631},{"text":"window","s":23.711,"e":24.031},{"text":"that","s":24.151,"e":24.271},{"text":"starts","s":24.431,"e":24.591},{"text":"with","s":24.671,"e":24.751},{"text":"a","s":24.831,"e":24.911},{"text":"fresh","s":25.031,"e":25.151},{"text":"prompt.","s":25.231,"e":25.871}]},{"template":"flow","chapter":"Context isolation","narration":"Here's why that matters. The main agent writes a short brief and hands it to the subagent. The subagent burns through tens of thousands of tokens, searching and reading files. Then it returns a compact summary, maybe a thousand or two thousand tokens. As Thorsten Ball puts it, all the garbage tokens stay out of your main context.","params":{"nodes":[{"label":"Main agent","sub":"writes a short brief","kind":"agent","at":"short brief"},{"label":"Subagent","sub":"tens of thousands of tokens of grep & reads","kind":"agent","at":"burns through"},{"label":"Summary","sub":"~1–2k tokens back","kind":"doc","at":"compact summary"},{"label":"Main agent","sub":"context still clean","kind":"check","at":"garbage tokens"}]},"start":26.474,"dur":22.266,"words":[{"text":"Here's","s":26.774,"e":27.054},{"text":"why","s":27.094,"e":27.254},{"text":"that","s":27.334,"e":27.414},{"text":"matters.","s":27.574,"e":28.334},{"text":"The","s":28.614,"e":28.694},{"text":"main","s":28.774,"e":28.934},{"text":"agent","s":29.014,"e":29.334},{"text":"writes","s":29.454,"e":29.574},{"text":"a","s":29.654,"e":29.734},{"text":"short","s":29.814,"e":29.974},{"text":"brief","s":30.054,"e":30.454},{"text":"and","s":30.534,"e":30.694},{"text":"hands","s":30.814,"e":30.934},{"text":"it","s":31.014,"e":31.094},{"text":"to","s":31.134,"e":31.174},{"text":"the","s":31.254,"e":31.334},{"text":"subagent.","s":31.414,"e":32.054},{"text":"The","s":32.534,"e":32.614},{"text":"subagent","s":32.774,"e":33.254},{"text":"burns","s":33.334,"e":33.654},{"text":"through","s":33.774,"e":33.894},{"text":"tens","s":33.974,"e":34.294},{"text":"of","s":34.374,"e":34.454},{"text":"thousands","s":34.614,"e":35.014},{"text":"of","s":35.094,"e":35.174},{"text":"tokens,","s":35.254,"e":35.894},{"text":"searching","s":35.974,"e":36.454},{"text":"and","s":36.494,"e":36.534},{"text":"reading","s":36.614,"e":36.854},{"text":"files.","s":37.014,"e":37.774},{"text":"Then","s":38.054,"e":38.294},{"text":"it","s":38.454,"e":38.534},{"text":"returns","s":38.734,"e":38.934},{"text":"a","s":38.974,"e":39.014},{"text":"compact","s":39.094,"e":39.574},{"text":"summary,","s":39.654,"e":40.294},{"text":"maybe","s":40.374,"e":40.614},{"text":"a","s":40.694,"e":40.774},{"text":"thousand","s":40.854,"e":41.254},{"text":"or","s":41.334,"e":41.494},{"text":"two","s":41.574,"e":41.654},{"text":"thousand","s":41.734,"e":42.054},{"text":"tokens.","s":42.134,"e":42.894},{"text":"As","s":43.174,"e":43.334},{"text":"Thorsten","s":43.414,"e":43.734},{"text":"Ball","s":43.814,"e":43.974},{"text":"puts","s":44.054,"e":44.294},{"text":"it,","s":44.374,"e":44.854},{"text":"all","s":44.934,"e":45.094},{"text":"the","s":45.134,"e":45.174},{"text":"garbage","s":45.334,"e":45.734},{"text":"tokens","s":45.814,"e":46.214},{"text":"stay","s":46.334,"e":46.454},{"text":"out","s":46.614,"e":46.774},{"text":"of","s":46.814,"e":46.854},{"text":"your","s":46.934,"e":47.014},{"text":"main","s":47.094,"e":47.174},{"text":"context.","s":47.254,"e":48.134}]},{"template":"stat","chapter":"Context isolation","narration":"In one of Matt Pocock's sessions, an explore subagent used almost ninety-four thousand tokens of its own, and the main context barely moved. Thorsten calls this the multiplication of context windows: every subagent call is a whole new window.","params":{"items":[{"value":93.7,"decimals":1,"suffix":"k","label":"tokens used by one explore subagent","tone":"agent","at":"ninety-four"},{"value":"≈0","label":"growth of the main agent's context","tone":"good","at":"barely moved"}],"src":"Matt Pocock, “Full Walkthrough: Workflow for AI Coding” · Thorsten Ball, Amp"},"start":48.74,"dur":16.754,"words":[{"text":"In","s":49.04,"e":49.2},{"text":"one","s":49.28,"e":49.36},{"text":"of","s":49.4,"e":49.44},{"text":"Matt","s":49.52,"e":49.68},{"text":"Pocock's","s":49.76,"e":50.24},{"text":"sessions,","s":50.48,"e":51.04},{"text":"an","s":51.08,"e":51.12},{"text":"explore","s":51.2,"e":51.68},{"text":"subagent","s":51.8,"e":52.24},{"text":"used","s":52.32,"e":52.56},{"text":"almost","s":52.64,"e":52.96},{"text":"ninety-four","s":53.12,"e":53.68},{"text":"thousand","s":54,"e":54.4},{"text":"tokens","s":54.48,"e":54.8},{"text":"of","s":54.88,"e":54.92},{"text":"its","s":54.96,"e":55.12},{"text":"own,","s":55.2,"e":55.68},{"text":"and","s":55.72,"e":55.76},{"text":"the","s":55.84,"e":55.88},{"text":"main","s":55.92,"e":56.08},{"text":"context","s":56.24,"e":56.72},{"text":"barely","s":56.88,"e":57.2},{"text":"moved.","s":57.28,"e":58.24},{"text":"Thorsten","s":58.36,"e":58.72},{"text":"calls","s":58.8,"e":59.04},{"text":"this","s":59.12,"e":59.28},{"text":"the","s":59.36,"e":59.44},{"text":"multiplication","s":59.52,"e":60.32},{"text":"of","s":60.4,"e":60.48},{"text":"context","s":60.56,"e":61.04},{"text":"windows:","s":61.12,"e":62.08},{"text":"every","s":62.16,"e":62.4},{"text":"subagent","s":62.56,"e":62.96},{"text":"call","s":63.04,"e":63.36},{"text":"is","s":63.44,"e":63.52},{"text":"a","s":63.6,"e":63.72},{"text":"whole","s":63.84,"e":64},{"text":"new","s":64.08,"e":64.16},{"text":"window.","s":64.24,"e":64.88}]},{"template":"compare","chapter":"Not role-play","narration":"There's a popular misconception. People build teams of personas: a front-end developer agent, a QA agent, a product manager agent. Dex Horthy is blunt about it: subagents are not for anthropomorphizing roles. They are for controlling context. Boris Cherny adds that the real value is uncorrelated context windows that don't know about each other.","params":{"left":{"title":"Role-play","items":["“Senior frontend dev” agent","“QA engineer” agent","Agents chatting in character"],"at":"personas"},"right":{"title":"Context control","items":["Explore and summarize","Run noisy work, return results","Fresh eyes with no shared history"],"at":"controlling context"}},"start":65.494,"dur":24.277,"words":[{"text":"There's","s":65.794,"e":65.994},{"text":"a","s":66.034,"e":66.114},{"text":"popular","s":66.194,"e":66.594},{"text":"misconception.","s":66.714,"e":67.714},{"text":"People","s":67.954,"e":68.274},{"text":"build","s":68.354,"e":68.594},{"text":"teams","s":68.794,"e":68.994},{"text":"of","s":69.074,"e":69.154},{"text":"personas:","s":69.354,"e":70.194},{"text":"a","s":70.274,"e":70.354},{"text":"front-end","s":70.434,"e":70.754},{"text":"developer","s":70.994,"e":71.234},{"text":"agent,","s":71.314,"e":71.954},{"text":"a","s":72.034,"e":72.114},{"text":"QA","s":72.194,"e":72.594},{"text":"agent,","s":72.674,"e":73.314},{"text":"a","s":73.394,"e":73.474},{"text":"product","s":73.554,"e":73.874},{"text":"manager","s":73.954,"e":74.274},{"text":"agent.","s":74.354,"e":74.754},{"text":"Dex","s":75.234,"e":75.554},{"text":"Horthy","s":75.687,"e":75.954},{"text":"is","s":76.074,"e":76.194},{"text":"blunt","s":76.234,"e":76.434},{"text":"about","s":76.514,"e":76.754},{"text":"it:","s":76.834,"e":77.394},{"text":"subagents","s":77.474,"e":78.194},{"text":"are","s":78.314,"e":78.434},{"text":"not","s":78.514,"e":78.754},{"text":"for","s":78.834,"e":78.914},{"text":"anthropomorphizing","s":78.994,"e":79.874},{"text":"roles.","s":79.954,"e":80.754},{"text":"They","s":80.794,"e":80.834},{"text":"are","s":80.914,"e":80.994},{"text":"for","s":81.074,"e":81.154},{"text":"controlling","s":81.274,"e":81.714},{"text":"context.","s":81.794,"e":83.074},{"text":"Boris","s":83.154,"e":83.394},{"text":"Cherny","s":83.474,"e":83.954},{"text":"adds","s":84.114,"e":84.274},{"text":"that","s":84.354,"e":84.434},{"text":"the","s":84.514,"e":84.594},{"text":"real","s":84.674,"e":84.834},{"text":"value","s":84.914,"e":85.394},{"text":"is","s":85.474,"e":85.634},{"text":"uncorrelated","s":85.714,"e":86.434},{"text":"context","s":86.514,"e":86.994},{"text":"windows","s":87.074,"e":87.474},{"text":"that","s":87.594,"e":87.714},{"text":"don't","s":87.794,"e":88.034},{"text":"know","s":88.114,"e":88.194},{"text":"about","s":88.314,"e":88.434},{"text":"each","s":88.514,"e":88.594},{"text":"other.","s":88.674,"e":89.154}]},{"template":"list","chapter":"Good uses","narration":"So what are subagents good for? Exploring: Claude Code often sends an explore subagent before touching an existing repo. Running a verbose test suite and reporting only the failures. Reviewing with fresh eyes, since an agent reviewing its own work tends to go easy on itself. And trying several designs at once: Matt Pocock spawns three subagents, each told to produce a radically different interface.","params":{"title":"What subagents are good for","items":[{"text":"Explore","sub":"search a big codebase, return a map","at":"Exploring"},{"text":"Run noisy work","sub":"a huge test suite → just the failures","at":"verbose"},{"text":"Fresh-eyes review","sub":"no stake in the code it's judging","at":"fresh eyes"},{"text":"Explore alternatives","sub":"3 radically different designs, side by side","at":"radically different"}]},"start":89.771,"dur":27.308,"words":[{"text":"So","s":90.071,"e":90.311},{"text":"what","s":90.551,"e":90.711},{"text":"are","s":90.751,"e":90.791},{"text":"subagents","s":90.871,"e":91.431},{"text":"good","s":91.511,"e":91.671},{"text":"for?","s":91.751,"e":92.071},{"text":"Exploring:","s":92.711,"e":93.831},{"text":"Claude","s":93.911,"e":94.151},{"text":"Code","s":94.231,"e":94.471},{"text":"often","s":94.551,"e":94.871},{"text":"sends","s":94.951,"e":95.191},{"text":"an","s":95.231,"e":95.271},{"text":"explore","s":95.431,"e":95.831},{"text":"subagent","s":95.911,"e":96.471},{"text":"before","s":96.671,"e":96.871},{"text":"touching","s":96.951,"e":97.271},{"text":"an","s":97.311,"e":97.351},{"text":"existing","s":97.591,"e":97.831},{"text":"repo.","s":97.911,"e":98.311},{"text":"Running","s":98.791,"e":99.031},{"text":"a","s":99.071,"e":99.111},{"text":"verbose","s":99.351,"e":99.591},{"text":"test","s":99.671,"e":99.911},{"text":"suite","s":99.991,"e":100.311},{"text":"and","s":100.351,"e":100.391},{"text":"reporting","s":100.471,"e":101.031},{"text":"only","s":101.191,"e":101.351},{"text":"the","s":101.391,"e":101.431},{"text":"failures.","s":101.511,"e":102.151},{"text":"Reviewing","s":102.631,"e":103.031},{"text":"with","s":103.111,"e":103.191},{"text":"fresh","s":103.351,"e":103.591},{"text":"eyes,","s":103.671,"e":104.311},{"text":"since","s":104.391,"e":104.551},{"text":"an","s":104.631,"e":104.711},{"text":"agent","s":104.791,"e":105.031},{"text":"reviewing","s":105.111,"e":105.431},{"text":"its","s":105.511,"e":105.671},{"text":"own","s":105.751,"e":105.911},{"text":"work","s":105.991,"e":106.231},{"text":"tends","s":106.311,"e":106.551},{"text":"to","s":106.631,"e":106.711},{"text":"go","s":106.791,"e":106.871},{"text":"easy","s":106.951,"e":107.191},{"text":"on","s":107.271,"e":107.351},{"text":"itself.","s":107.431,"e":108.071},{"text":"And","s":108.311,"e":108.631},{"text":"trying","s":108.871,"e":109.191},{"text":"several","s":109.351,"e":109.591},{"text":"designs","s":109.671,"e":110.071},{"text":"at","s":110.111,"e":110.151},{"text":"once:","s":110.231,"e":111.031},{"text":"Matt","s":111.111,"e":111.271},{"text":"Pocock","s":111.351,"e":111.751},{"text":"spawns","s":111.831,"e":112.231},{"text":"three","s":112.311,"e":112.551},{"text":"subagents,","s":112.631,"e":113.511},{"text":"each","s":113.631,"e":113.751},{"text":"told","s":113.791,"e":113.991},{"text":"to","s":114.071,"e":114.151},{"text":"produce","s":114.311,"e":114.471},{"text":"a","s":114.551,"e":114.631},{"text":"radically","s":114.711,"e":115.191},{"text":"different","s":115.271,"e":115.591},{"text":"interface.","s":115.871,"e":116.471}]},{"template":"agents","chapter":"Fan out, then filter","narration":"Subagents also enable a powerful pattern: fan out, then filter. Boris describes a code review command that sends parallel subagents to look for problems from different angles. Then several more subagents check each finding for false positives, so you only see real issues.","params":{"title":"Fan out, then filter","lanes":[{"label":"Check against CLAUDE.md rules","result":"2 findings","at":"parallel"},{"label":"Check git history context","result":"1 finding"},{"label":"Look for obvious bugs","result":"4 findings","at":"different angles"},{"label":"Verify findings (false positives?)","result":"3 confirmed","at":"false positives"}],"merge":{"label":"3 real issues, no noise","at":"only see"}},"start":117.079,"dur":19.314,"words":[{"text":"Subagents","s":117.379,"e":118.119},{"text":"also","s":118.179,"e":118.499},{"text":"enable","s":118.579,"e":118.946},{"text":"a","s":118.979,"e":119.059},{"text":"powerful","s":119.139,"e":119.619},{"text":"pattern:","s":119.699,"e":120.579},{"text":"fan","s":120.659,"e":120.899},{"text":"out,","s":120.979,"e":121.459},{"text":"then","s":121.579,"e":121.699},{"text":"filter.","s":121.779,"e":122.259},{"text":"Boris","s":122.899,"e":123.219},{"text":"describes","s":123.299,"e":123.699},{"text":"a","s":123.779,"e":123.859},{"text":"code","s":123.979,"e":124.099},{"text":"review","s":124.179,"e":124.419},{"text":"command","s":124.499,"e":124.899},{"text":"that","s":124.979,"e":125.139},{"text":"sends","s":125.179,"e":125.379},{"text":"parallel","s":125.459,"e":125.939},{"text":"subagents","s":126.019,"e":126.659},{"text":"to","s":126.739,"e":126.819},{"text":"look","s":126.899,"e":126.979},{"text":"for","s":127.059,"e":127.139},{"text":"problems","s":127.219,"e":127.619},{"text":"from","s":127.699,"e":127.859},{"text":"different","s":127.939,"e":128.179},{"text":"angles.","s":128.259,"e":128.819},{"text":"Then","s":129.379,"e":129.619},{"text":"several","s":129.859,"e":130.179},{"text":"more","s":130.259,"e":130.499},{"text":"subagents","s":130.579,"e":131.139},{"text":"check","s":131.219,"e":131.459},{"text":"each","s":131.539,"e":131.779},{"text":"finding","s":131.859,"e":132.179},{"text":"for","s":132.259,"e":132.339},{"text":"false","s":132.419,"e":132.659},{"text":"positives,","s":132.739,"e":133.539},{"text":"so","s":133.619,"e":133.699},{"text":"you","s":133.779,"e":133.939},{"text":"only","s":134.099,"e":134.259},{"text":"see","s":134.339,"e":134.499},{"text":"real","s":134.659,"e":134.899},{"text":"issues.","s":134.979,"e":135.779}]},{"template":"stat","chapter":"When parallel pays off","narration":"How much can this help? On Anthropic's internal research benchmark, a lead agent coordinating parallel subagents outperformed a single agent by ninety percent. But they're careful to add that most coding tasks have fewer truly independent pieces than research, and agents aren't yet great at coordinating each other in real time.","params":{"items":[{"value":90.2,"decimals":1,"prefix":"+","suffix":"%","label":"multi-agent vs single agent on breadth-first research","tone":"good","at":"ninety percent"}],"src":"Anthropic, “How we built our multi-agent research system” (Opus 4 lead + Sonnet 4 subagents)"},"start":136.393,"dur":21.456,"words":[{"text":"How","s":136.693,"e":136.933},{"text":"much","s":137.013,"e":137.173},{"text":"can","s":137.253,"e":137.333},{"text":"this","s":137.413,"e":137.493},{"text":"help?","s":137.573,"e":137.973},{"text":"On","s":138.453,"e":138.533},{"text":"Anthropic's","s":138.613,"e":139.173},{"text":"internal","s":139.253,"e":139.653},{"text":"research","s":139.733,"e":140.133},{"text":"benchmark,","s":140.213,"e":141.013},{"text":"a","s":141.093,"e":141.173},{"text":"lead","s":141.253,"e":141.493},{"text":"agent","s":141.573,"e":141.893},{"text":"coordinating","s":141.973,"e":142.533},{"text":"parallel","s":142.613,"e":143.093},{"text":"subagents","s":143.253,"e":143.893},{"text":"outperformed","s":144.053,"e":144.613},{"text":"a","s":144.693,"e":144.813},{"text":"single","s":144.933,"e":145.173},{"text":"agent","s":145.253,"e":145.573},{"text":"by","s":145.653,"e":145.813},{"text":"ninety","s":145.973,"e":146.213},{"text":"percent.","s":146.373,"e":146.933},{"text":"But","s":147.493,"e":147.733},{"text":"they're","s":147.813,"e":147.973},{"text":"careful","s":148.093,"e":148.293},{"text":"to","s":148.373,"e":148.453},{"text":"add","s":148.533,"e":148.773},{"text":"that","s":148.893,"e":149.013},{"text":"most","s":149.173,"e":149.413},{"text":"coding","s":149.493,"e":149.733},{"text":"tasks","s":149.813,"e":150.213},{"text":"have","s":150.293,"e":150.453},{"text":"fewer","s":150.533,"e":150.853},{"text":"truly","s":150.933,"e":151.333},{"text":"independent","s":151.413,"e":151.893},{"text":"pieces","s":151.973,"e":152.293},{"text":"than","s":152.373,"e":152.453},{"text":"research,","s":152.533,"e":153.493},{"text":"and","s":153.573,"e":153.813},{"text":"agents","s":154.013,"e":154.213},{"text":"aren't","s":154.293,"e":154.533},{"text":"yet","s":154.653,"e":154.773},{"text":"great","s":154.853,"e":155.093},{"text":"at","s":155.173,"e":155.253},{"text":"coordinating","s":155.333,"e":155.813},{"text":"each","s":155.893,"e":156.053},{"text":"other","s":156.133,"e":156.213},{"text":"in","s":156.293,"e":156.373},{"text":"real","s":156.453,"e":156.613},{"text":"time.","s":156.693,"e":157.253}]},{"template":"list","chapter":"Pitfalls","narration":"A few pitfalls. Don't over-split: Simon Willison warns against dozens of specialist subagents. Watch the handoff: Will from Anthropic says a subagent can get its task right and still fail because the message back to the orchestrator lost something. And for big outputs, have subagents write to files and pass back a path, instead of a game of telephone.","params":{"title":"Pitfalls","style":"warn","items":[{"text":"Over-splitting","sub":"dozens of specialists = coordination overhead","at":"over-split"},{"text":"Lossy handoffs","sub":"right answer, garbled report","at":"handoff"},{"text":"Telephone games","sub":"write big outputs to files, pass paths","at":"telephone"}]},"start":157.849,"dur":24.983,"words":[{"text":"A","s":158.149,"e":158.309},{"text":"few","s":158.389,"e":158.469},{"text":"pitfalls.","s":158.549,"e":159.589},{"text":"Don't","s":159.909,"e":160.149},{"text":"over-split:","s":160.309,"e":161.509},{"text":"Simon","s":161.589,"e":161.909},{"text":"Willison","s":161.989,"e":162.389},{"text":"warns","s":162.469,"e":162.789},{"text":"against","s":162.989,"e":163.189},{"text":"dozens","s":163.349,"e":163.749},{"text":"of","s":163.829,"e":163.869},{"text":"specialist","s":163.909,"e":164.469},{"text":"subagents.","s":164.549,"e":165.269},{"text":"Watch","s":165.909,"e":166.149},{"text":"the","s":166.229,"e":166.309},{"text":"handoff:","s":166.469,"e":167.349},{"text":"Will","s":167.429,"e":167.669},{"text":"from","s":167.749,"e":167.829},{"text":"Anthropic","s":167.949,"e":168.469},{"text":"says","s":168.549,"e":168.789},{"text":"a","s":168.869,"e":169.029},{"text":"subagent","s":169.109,"e":169.589},{"text":"can","s":169.669,"e":169.829},{"text":"get","s":169.869,"e":169.909},{"text":"its","s":169.989,"e":170.149},{"text":"task","s":170.229,"e":170.469},{"text":"right","s":170.629,"e":171.029},{"text":"and","s":171.149,"e":171.269},{"text":"still","s":171.429,"e":171.589},{"text":"fail","s":171.749,"e":172.069},{"text":"because","s":172.389,"e":172.629},{"text":"the","s":172.669,"e":172.709},{"text":"message","s":172.789,"e":173.109},{"text":"back","s":173.189,"e":173.349},{"text":"to","s":173.389,"e":173.429},{"text":"the","s":173.509,"e":173.589},{"text":"orchestrator","s":173.669,"e":174.309},{"text":"lost","s":174.469,"e":174.629},{"text":"something.","s":174.829,"e":175.349},{"text":"And","s":175.669,"e":175.909},{"text":"for","s":175.989,"e":176.149},{"text":"big","s":176.229,"e":176.309},{"text":"outputs,","s":176.389,"e":177.189},{"text":"have","s":177.309,"e":177.429},{"text":"subagents","s":177.509,"e":178.069},{"text":"write","s":178.149,"e":178.309},{"text":"to","s":178.389,"e":178.549},{"text":"files","s":178.749,"e":178.949},{"text":"and","s":179.029,"e":179.189},{"text":"pass","s":179.349,"e":179.509},{"text":"back","s":179.589,"e":179.669},{"text":"a","s":179.749,"e":179.829},{"text":"path,","s":179.909,"e":180.549},{"text":"instead","s":180.629,"e":180.949},{"text":"of","s":180.989,"e":181.029},{"text":"a","s":181.069,"e":181.109},{"text":"game","s":181.189,"e":181.269},{"text":"of","s":181.349,"e":181.429},{"text":"telephone.","s":181.509,"e":182.229}]},{"template":"quiz","chapter":"Quick check","narration":"Quick check. Which of these is the best use of a subagent? Tap your answer.","params":{"q":"Which is the best use of a subagent?","options":["A “senior frontend developer” persona chatting with a “QA” persona","Searching a huge codebase and returning a short map to the main agent","Splitting a ten-line bug fix across five agents","Running every single tool call in its own agent"],"answer":1,"explain":"Subagents are for context control: let one absorb the messy search and hand back only what matters."},"start":182.832,"dur":10.829,"words":[{"text":"Quick","s":183.132,"e":183.372},{"text":"check.","s":183.452,"e":183.772},{"text":"Which","s":184.332,"e":184.492},{"text":"of","s":184.572,"e":184.652},{"text":"these","s":184.812,"e":184.972},{"text":"is","s":185.052,"e":185.132},{"text":"the","s":185.212,"e":185.372},{"text":"best","s":185.532,"e":185.692},{"text":"use","s":185.772,"e":186.012},{"text":"of","s":186.092,"e":186.172},{"text":"a","s":186.212,"e":186.252},{"text":"subagent?","s":186.332,"e":187.212},{"text":"Tap","s":187.452,"e":187.612},{"text":"your","s":187.692,"e":187.772},{"text":"answer.","s":187.852,"e":188.412}]},{"template":"exercise","chapter":"Try it","narration":"Try both classic uses in one go. One subagent explores and reports back a short map. A second, with no knowledge of your plans, reviews a file with fresh eyes.","params":{"title":"Try it with your agent","intro":"In Claude Code, Codex or any agent with subagents:","prompt":"Use a subagent to explore how [feature] works across the codebase\nand report back under 300 words, with file paths.\nThen use a second, fresh subagent with no knowledge of my plans to\nreview [file] for bugs. Tell me roughly how much context each used."},"start":193.661,"dur":12.026,"words":[{"text":"Try","s":193.961,"e":194.201},{"text":"both","s":194.281,"e":194.521},{"text":"classic","s":194.761,"e":195.001},{"text":"uses","s":195.081,"e":195.401},{"text":"in","s":195.481,"e":195.561},{"text":"one","s":195.641,"e":195.721},{"text":"go.","s":195.801,"e":196.441},{"text":"One","s":196.761,"e":196.921},{"text":"subagent","s":197.001,"e":197.561},{"text":"explores","s":197.761,"e":198.201},{"text":"and","s":198.281,"e":198.361},{"text":"reports","s":198.601,"e":198.841},{"text":"back","s":198.921,"e":199.081},{"text":"a","s":199.161,"e":199.241},{"text":"short","s":199.321,"e":199.561},{"text":"map.","s":199.641,"e":200.361},{"text":"A","s":200.441,"e":200.521},{"text":"second,","s":200.721,"e":201.161},{"text":"with","s":201.281,"e":201.401},{"text":"no","s":201.481,"e":201.561},{"text":"knowledge","s":201.641,"e":201.881},{"text":"of","s":201.961,"e":202.041},{"text":"your","s":202.121,"e":202.201},{"text":"plans,","s":202.441,"e":202.921},{"text":"reviews","s":203.001,"e":203.321},{"text":"a","s":203.401,"e":203.481},{"text":"file","s":203.561,"e":203.881},{"text":"with","s":203.961,"e":204.041},{"text":"fresh","s":204.121,"e":204.361},{"text":"eyes.","s":204.441,"e":205.081}]},{"template":"recap","chapter":"Recap","narration":"Recap. A subagent is a fresh copy with its own context window. Use it for context control, not role-play. Explore, run noisy work, review with fresh eyes, try alternatives. Fan out, then filter. And don't over-split. Next: running whole agents in parallel.","params":{"items":["A fresh copy, its own *context window*","Context control, not role-play","Explore · noisy work · fresh eyes · alternatives","Don't over-split; watch the handoff"],"next":"Running agents in parallel","next_at":"Next"},"start":205.687,"dur":22.981,"words":[{"text":"Recap.","s":205.987,"e":206.627},{"text":"A","s":207.107,"e":207.187},{"text":"subagent","s":207.267,"e":207.827},{"text":"is","s":207.907,"e":207.987},{"text":"a","s":208.067,"e":208.147},{"text":"fresh","s":208.227,"e":208.467},{"text":"copy","s":208.547,"e":208.867},{"text":"with","s":208.947,"e":209.027},{"text":"its","s":209.107,"e":209.347},{"text":"own","s":209.427,"e":209.587},{"text":"context","s":209.667,"e":210.147},{"text":"window.","s":210.347,"e":210.827},{"text":"Use","s":211.107,"e":211.267},{"text":"it","s":211.347,"e":211.387},{"text":"for","s":211.427,"e":211.587},{"text":"context","s":211.667,"e":212.067},{"text":"control,","s":212.147,"e":212.867},{"text":"not","s":212.947,"e":213.187},{"text":"role-play.","s":213.267,"e":213.827},{"text":"Explore,","s":214.387,"e":215.347},{"text":"run","s":215.427,"e":215.587},{"text":"noisy","s":215.667,"e":215.987},{"text":"work,","s":216.067,"e":216.707},{"text":"review","s":216.787,"e":217.187},{"text":"with","s":217.267,"e":217.347},{"text":"fresh","s":217.427,"e":217.667},{"text":"eyes,","s":217.747,"e":218.547},{"text":"try","s":218.667,"e":218.787},{"text":"alternatives.","s":218.987,"e":219.587},{"text":"Fan","s":220.147,"e":220.387},{"text":"out,","s":220.467,"e":220.947},{"text":"then","s":221.027,"e":221.187},{"text":"filter.","s":221.347,"e":221.987},{"text":"And","s":222.227,"e":222.387},{"text":"don't","s":222.467,"e":222.787},{"text":"over-split.","s":222.867,"e":224.067},{"text":"Next:","s":224.627,"e":225.187},{"text":"running","s":225.347,"e":225.427},{"text":"whole","s":225.667,"e":225.747},{"text":"agents","s":226.147,"e":226.227},{"text":"in","s":226.307,"e":226.387},{"text":"parallel.","s":226.867,"e":227.107}]}],"total":229.068,"audio":"/audio/15-subagents.mp3"}