Anthropic has recently made Claude Code Subagents generally available, enabling developers to create independent, task-specific AI agents with their own context, tools, and prompts.
Designed for modular development, subagents can be orchestrated automatically or invoked manually, allowing teams to delegate work such as debugging, documentation, or test generation without overloading a single-context window.
Subagents operate in isolation from each other and the main agent, reducing the risk of context spillover and enabling more predictable task execution. Developers can trigger subagents manually for direct control, or rely on Claude Code’s orchestration engine to match tasks with the most suitable subagents automatically.
Each subagent is defined in a Markdown file and stored either in a project-specific directory or a global user directory. Project-specific agents take precedence, supporting customization per project. Files can be version-controlled for collaboration across teams and portability between environments.
The Claude Code CLI provides an interactive workflow for managing subagents. Developers can scaffold a new agent through guided prompts, then edit the generated file in their preferred text editor. This hybrid approach combines automation with full developer control, fitting into existing development practices without requiring a new IDE or workflow.
Figure 1: Subagent structure – Source: Subagents documentation
Security and permission management are built into the subagent architecture. Each subagent’s configuration explicitly lists the tools it’s allowed to access, such as running shell commands or accessing external resources. Anthropic’s documentation recommends granting only the minimum set of permissions required for each subagent’s role, limiting the blast radius in sensitive environments.
One of the subagent examples listed in the Subagent’s documentation is named “code-reviewer” and is described as an expert code review specialist. One way to invoke this specific subagent is to issue the following command in the Claude Code terminal: “Use the code-reviewer subagent to check my recent changes.” A large collection of community-created subagents has emerged and is available on the internet for Claude Code users to leverage and learn from. This GitHub repository contains over 60 specialized subagents organized into various domains, including Development & Architecture, Language Specialist, Infrastructure & Operations, Business & Marketing, and more.
To improve reliability and maintainability, the Subagents’s documentation also suggests keeping scopes narrow, writing precise system prompts, and avoiding unnecessary tool assignments. Isolating context and enforcing least privilege aims to make AI-assisted development safer and more interpretable.