# "Claude Code Sub-Agents" <!-- ref: @content/youtube/bmad-code/2025-07-25-claude-code-sub-agents triggers: [context pollution in workflows, need for isolated agent tasks, unreliable access controls, desire for reusable agents] trigger_prompt: When users experience issues with context bleeding in long workflows or require distinct permissions for different agents within a single chat. version: 4 updated_at: 2026-10-31T18:22:31.572Z --> Claude Code (BMad Code, 2025-07-25): Claude Code's new sub-agents feature is a potential game changer because it brings **true multi-agent orchestration into a single chat instance** — each sub-agent runs in its own subprocess with an isolated context window and enforced tool/MCP permissions. Brian, creator of the BMAD method, breaks his usual no-hype rule to walk through Claude Code's newly released custom sub-agents feature and what it means for orchestrated agent workflows. ## Core Thesis Claude Code's new sub-agents feature is a potential game changer because it brings **true multi-agent orchestration into a single chat instance** — each sub-agent runs in its own subprocess with an isolated context window and enforced tool/MCP permissions. This solves two long-standing weaknesses of prompt-only agent frameworks like BMAD: context pollution across long workflows and unreliable, words-only access controls. The result is reusable, shareable, role-scoped agents that can hand work off to each other without bleeding context into the parent conversation. ## Key Insights - **Sub-agents = stored prompts with teeth.** Agents are fundamentally just saved prompts with a persona, but Claude Code now adds isolated context, configurable tools/MCP access, and automatic agent selection — making prior BMAD-style patterns native and enforced. - **Context preservation is the breakthrough.** Each sub-agent consumes its own context budget; when its job is done it goes "out of context" and the parent orchestrator stays focused. - **Enforced permissions replace prompt-based restrictions.** Previously BMAD relied on words to keep, e.g., a PM agent away from code. Cursor already supported scoping; Claude Code now matches it with real enforcement. - **True parent-orchestrator pattern in one chat.** A single instance can dispatch a Scrum Master → Developer ↔ QA TDD ping-pong → final review loop without spawning separate sessions. - **Reusable and shareable across projects/teams.** Sub-agents can be checked in and distributed for consistent workflows — a meaningful upgrade to BMAD's Claude installation story. - **Domain-agnostic.** BMAD and sub-agent patterns extend beyond software dev to PM, clinical psychology, business ops, and personal life management — "ChatGPT programmed with knowledge." - **Community-driven rollout.** BMAD installer integration with Claude Code is being actively developed by the community, with big updates teased. ## Actionable Takeaways 1. Update Claude Code to surface the in-app onboarding message about the new feature. 2. Run `/agents` and prototype agents by describing them in natural language — Claude auto-generates the agent file (similar to autogenerating Cursor rules). 3. Iterate like rules: keep it simple, test, tweak the file, retry. 4. Build a TDD loop: Scrum Master generates the story → Developer and QA alternate (tests ↔ implementation) → QA reviews/refactors → Scrum Master does final review and preps the next story. 5. Use the flexible permission model to scope each agent's tool/MCP access rather than relying on prompt instructions. 6. DIY today: take any prompt you reuse, save it as a file with a name and persona — that's a custom agent. Watch the BMAD Code community for upcoming Claude Code installer changes. ## Notable Quotes > "What are agents really? They're prompts that you've stored." > "Each sub agent operates in its own context, preventing pollution of the main conversation and keeping it focused." > "This is now going to give us the ability to have a true orchestrator that could potentially run in the same chat instance and then have different agents do different things." > "It's like using ChatGPT but programming it with knowledge and understanding." > "This is almost like autogenerating rules in Cursor." > "Look for big changes with the claude code version of the BMAD installer very soon as we work hard in the community to get this incorporated and worked into this amazing system." --- *You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).* *Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*