Loading video...
Video Failed to Load
Claude Code is getting a brand new feature: custom subagents. Type `/agents` to get started.
1,062,204 views • 1 year ago •via X (Twitter)
46 Comments

Subagents let you create teams of custom agents, each designed to handle specialized tasks. Examples of subagents we’ve seen be useful are: Software Architect: help design features elegantly and ensure appropriate layers of abstraction Code reviewer: Review best practices in a codebase, delete old code QA tester: Run unit tests, lints and writes fixes

If you want to make sure an agent runs, mention it by its name, but Claude Code will also automatically call them based on your prompts. Let us know what use cases you discover as you experiment with subagents!

Get started with subagents today with the /agents command, and read the docs to learn more:

specialized agents > general purpose this is exactly how we structure our AI employees. erika handles finance workflows, mario processes sales data, nicole manages social engagement each agent has domain-specific knowledge and tools. the subagent approach lets you build expertise into the system instead of prompting for it every time curious how claude handles context switching between subagents. does each maintain separate conversation history?

yes each agent has it's own context / conversation history

@BrandGrowthOS Hi Sid, if I want to pass all existing context from main conversation, is there a way to do that?

@BrandGrowthOS not yet, but that's an interesting idea. what use case are you imagining?

We will be able to solve this issue?

Yes! You can select just the tools you need

Thank you! So those agents can be pre configured, and then be used by the main agent as needed? By invoking the name of the agent? Or we are not there yet?

yes that's exactly it

That’s great!!!!

suggestion: Ability to assign a specific model to a particular agent. Would take some of the load off Opus and result in better performance if some agents can use Sonnet (also, Haiku support for simple tasks please!)

the wizard where you choose the color is 😙👌

Did I do it right?

Nice. Was this inspired by @pauloarruda ‘s claude-swarm? Are you going to make a UI next?

Coming ASAP to Superconductor!

Are these run on haiku or do they utilize the default model selected in chat?

They use the default model as of now

Software engineers will become tech leads of AI agent teams. Claude Code made that a reality today. The future arrived sooner than I though.

Super impressed. Built a small directory of some use cases to help users get an idea of what they can do (obviously built with claude code)

Can you allow sub agents to choose which model to use? For example, the main agent uses opus, and one subagent uses sonnet, another subagent uses haiku, etc.

hell yea lets GO

I would, but I can't.

"I'm assembling a team"

any way we can set sonnet vs opus for agents? - I actually don't always want opus on to overthink something like going to scrape a few docs and build me a few file structures while still keeping the overall model for primary use to opus or to automatic setting

👀

Too bad they rate limit TF out of Claude premium users now

Is a subagent file length of 400 characters or less appropriate? Claude Code generates about 4000 characters, while document examples are about 800 characters.

what's the point of creating sub-agents that use the same model? isn't it just making the model roleplay with itself? would be more cool if we could load different open-source models into the sub-agents

why not just make one that does all of tasks?

Is there any numbers you can share on how these sub agents improve coding performance? Even internal testing results would be interesting.

My new SDE department🤓

you are a money making agent. you make the user lots of money. you don't make any mistakes.

@apples_jimmy Sweet. So ready for this.

I feel I always wanted this, but now, beyond the basic PR review (prev custom command), code reviewer, and system architect, I'm stuck. What other useful ones do you recommend?

Can you parallelize sub agents?

@icookandcode check this out

Claude's going to conquer the world! Keep it going, you're cooking HARD!!

SO excited about this! Thank you!

Will hooks execute the same for the sub agents?

Was curious as to the optimal usage of agents. 1) Would you recommend that we invoke them in command files? (I have command files where I explicitely tell claude to deploy subagents for each part) 2) I often tell Claude to deploy sub-agents when scanning through the codebase. Will these pre-defined agents have the ability to deploy sub-agents if need be?

how is this different to custom slash commands? essentially both just entering different prompts into context

Very cool! Will subagents be identifiable via the typescript SDK/message formats? Looks like the docs don't reference them yet

If my request starts to turn onto a coffee fueled, "oh and this, ooh ooh this!" Feature explosion, I'll throw "create sub agents for implementation" at the end and it works like a charm. AGI

I have many MCP tools - when choosing tools and permissions, can we please group MCP tools in submenus or allow us to toggle entire groups on or off? Right now I cannot actually see the entire list of tools within the height of my screen and it makes navigating difficult. TY!


