I’ve been using Claude Code for about a month now, and when Anthropic released subagents, I decided to dive deep and see what the fuss was about. After experimenting with them across several projects, I can say they’ve genuinely improved how I approach development work.
What started as curiosity about a new feature turned into a complete shift in my coding workflow. Here’s what I’ve learned about making subagents work in real development scenarios.
What Are Subagents (And Why Should You Care)?
Consider subagents as specialized development assistants, each with their own expertise and memory. Unlike regular AI assistants that try to be everything to everyone, these agents are laser-focused on specific tasks.
The key advantage: each subagent runs in its own context window. That means while your frontend specialist is handling React state management, your backend expert can focus purely on API design without getting confused by component props.
The Real Benefits (From Someone Who Actually Uses Them)
No More Context Pollution Previously, asking Claude about database design, then components, then testing could result in mixed advice, such as MongoDB recommendations for PostgreSQL projects. This issue is eliminated with subagents. Each agent stays in their lane.
Actual Expertise That Matters I’ve got a subagent that knows my exact ESLint config, my team’s PR template, and even remembers that we prefer functional components over class components. This provides consistent adherence to established development standards and team conventions.
Reusable Across Projects Set up your agents once, use them everywhere. My “API Designer” agent now works across five different projects, each time applying the same solid patterns I’ve refined over months.
Setting Up Your Development Team
Let me walk you through my actual setup for an expense tracker app. I have configured six agents that collaborate efficiently:
1. Frontend Developer
- Handles React patterns, TypeScript interfaces, and responsive design
- Knows when to use
useState
vsuseReducer
- Provides informed decisions on CSS-in-JS vs Tailwind trade-offs
2. Backend Engineer
- Specializes in REST patterns, database design, and server logic
- Understands your ORM quirks and deployment pipeline
- Maintains comprehensive knowledge of SQL and database schema
3. Test Expert
- Writes tests that actually catch bugs (not just boost coverage)
- Maintains deep familiarity with your testing stack
- Creates realistic mocks and fixtures
4. System Architect
- Makes sustainable technology decisions for long-term maintainability
- Ensures system components integrate effectively
- Thoroughly researches documentation before recommending libraries
5. Code Reviewer
- Catches security issues, performance problems, and style violations
- Provides actionable feedback (not just “this could be better”)
- Maintains comprehensive knowledge of team coding standards
6. Master Orchestrator
- Breaks down complex features into manageable tasks
- Delegates work to the right specialists
- Keeps everyone focused on the same goal
Creating Your First Agent
Below is the step-by-step process I use to create specialized agents:
Step 1: Open Terminal and Launch Claude CLI Navigate to your project directory in the terminal and launch Claude CLI. Then execute the agents command:
> /agents
Step 2: Choose Project Location
❯ 1. Project (.claude/agents/) ← Pick this for team sharing
2. Personal (~/.claude/agents/)
Step 3: Generate Agent Configuration
❯ 1. Generate with Claude (recommended) ← This approach significantly reduces setup time
2. Manual configuration ← For customized agent names and system prompts
Step 4: Define Specific Requirements Provide detailed specifications rather than generic roles. For example:
You are a Next.js TypeScript specialist familiar with our team's development patterns:
- We use Tailwind CSS with custom components
- All state management goes through Zustand
- We prefer server components when possible
- Error boundaries are mandatory for client components
- TypeScript strict mode is non-negotiable
Step 5: Configure Tool Permissions
- New agents: Start with all tools, then restrict later
- Specialized agents: Only give them what they need
- Review agents: Read-only tools are usually enough
Step 6: Pick Your Model
- Sonnet: Best for most agents (recommended)
- Haiku: Good for simple, repetitive tasks
- Inherit: Matches your main conversation
In my case, this is the structure of the sub-agents directory on my project:

How They Actually Work Together
Here’s a practical example from my expense tracker project. I initiated a conversation with Claude and requested the use of the master orchestrator agent to handle the task: “Build me an expense tracker app…”

See how the master-orchestrator breaks down the work into discrete tasks and delegates to the appropriate sub-agents:

How These Agents Coordinate
The subagents work together through a clear delegation hierarchy:
Master Orchestrator serves as the central coordinator, analyzing requirements and delegating tasks to appropriate specialists. When you request a feature, it determines which agents need to be involved and in what sequence.
System Architect is typically called first for new features, designing the overall structure and then coordinating with both Frontend Developer and Backend Engineer to ensure architectural consistency across the full stack.
Test Expert usually collaborates with whichever agent implemented the feature (Frontend Developer for component tests, Backend Engineer for API tests) to write comprehensive test coverage.
Code Reviewer gets involved at the end of any significant implementation, reviewing the work done by other agents and ensuring code quality, security, and adherence to team standards.
While coordination can happen automatically, you can also guide the workflow by explicitly chaining subagents (e.g., “First use the system architect to design the API, then have the backend engineer implement it”) or directly invoking specific agents with the @ syntax. The Master Orchestrator adapts to both automatic delegation and your explicit workflow preferences.
The Results Are Real
Since integrating sub-agents into my workflow:
- Code reviews happen faster and catch more issues
- Bug fixes are more targeted because the right specialist handles each problem
- New features follow consistent patterns across the entire codebase
- Team onboarding is smoother because agents enforce our standards automatically
Additionally, each agent develops improved understanding of the codebase over time. They learn your patterns, remember your preferences, and start anticipating what you need.
My Recommendations
Start Small, Think Big Don’t create six agents on day one. Start with a frontend and backend specialist, then add more as you discover gaps.
Be Specific About Your Stack Generic agents are okay agents. Specific agents are game-changers. Tell them about your exact setup, your team’s preferences, even your deployment pipeline.
Utilize the @ Syntax For targeted requests: @agent-code-reviewer check this component for accessibility issues
Tool Permissions Matter My code reviewer doesn’t need execution tools. My test expert doesn’t need deployment access. Be intentional about permissions.
Context is King Each agent should understand your project context. Include information about your:
- Tech stack and versions
- Team coding standards
- Project structure and conventions
- Common patterns and anti-patterns
IMPORTANT: After your sub-agents help set up the initial project structure, run /init
to index the codebase. This gives all agents a comprehensive understanding of your project’s architecture and existing code patterns, making their collaboration even more effective.
Managing Token Usage and Limits
Subagents consume tokens rapidly since each agent operates in its own context window. Pro plan users get ~10-40 prompts every 5 hours, while Max plan users get significantly more. Use /context
to monitor your remaining allocation and consider:
- Starting with 2-3 essential agents rather than a full team
- Using
/model
to switch to Sonnet instead of Opus for routine tasks (note: Opus is only available on Max plans) - Being strategic about when you invoke multiple agents simultaneously
Getting Started (Without Overwhelming Yourself)
Here’s my advice for your first week:
Day 1-2: Create a frontend and backend agent for your current project
Day 3-4: Add a code reviewer and start using @agent-code-reviewer
for PRs
Day 5-7: Experiment with the master orchestrator for small features
Don’t try to revolutionize your entire workflow overnight. These agents work best when they grow with your understanding of what you actually need.
Why This Matters
This represents more than enhanced code completion. Subagents represent a fundamental shift in how we think about AI-assisted development. Instead of one AI trying to juggle everything, you get a team of specialists who understand your domain, your patterns, and your goals.
This provides consistent expertise that maintains context and adheres to established development standards.
Honestly, subagents have genuinely changed how I code, and I think they’ll do the same for you. Pick one agent that solves your biggest pain point and give it a shot. You might be surprised at how quickly you start depending on it.
Happy coding!