Podcast Title

Author Name

0:00
0:00
Album Art

A Deep Dive into Anthropic's New Sub-Agents in Cloud Code

By 10xdev team July 25, 2025

Anthropic has released sub-agents in Cloud Code. So, what exactly is a sub-agent? A helpful way to think about it is by considering our daily work as developers. We often wear multiple hats—starting the day as a product manager, then moving on to writing automations, reviewing or improving designs, and finally, writing code. A sub-agent is Cloud Code's method for letting you define each of these distinct roles.

Key Configuration Options

For any sub-agent, you can configure several key aspects: - A clear purpose and area of expertise. - A specific set of tools it can use, including MCPs. - A custom system prompt to guide its behavior.

You have the flexibility to set up sub-agents on a per-project basis or make them available globally across all your projects.

Pricing and Token Usage

Currently, any Cloud Code user with a Pro or Max subscription can access the sub-agents feature. The specifics of token usage are still being evaluated, but it's an important factor to monitor.

Creating Your First Sub-Agent

To begin, you can create your first sub-agent using the command:

/agents

Note: If this command isn't available, you might be using an older version of Cloud Code and should update it.

Upon running the command, you'll see an interface to create a new sub-agent. The system will then ask whether you want to configure it for the current project or globally. For this example, we'll proceed with a project-specific configuration.

You are presented with two methods for generating the sub-agent: generating with Claude or setting it up manually. We will use the 'Generate with Claude' option. After its creation, we will review the generated file to understand the attributes required for a manual setup.

Example: An Automation Expert Sub-Agent

Let's create a sub-agent designed to write automations. The description could be:

'An expert automation writer that handles all levels of tests, including unit, integration, and end-to-end.'

Next, you must configure the tools the agent can access. While it defaults to selecting all tools, it is highly recommended to manually select them to prevent the agent from performing unexpected actions or damaging your repository. You can define various tool categories: - Read-only tools - Edit tools - Execution tools - MCPs and other utilities

For this example, we want it to have access to the Playwright MCP. A current limitation is that you must select each MCP function individually rather than the entire MCP at once.

You will also be prompted to pick a color for the agent's interface. We'll choose purple. And with that, the setup is complete.

Manual Configuration File

After creation, a file named test-automation-expert.md is generated within the .cloud/agents/ directory. This file contains all the necessary attributes for the agent's configuration. If you were to perform a manual setup, you would need to define the following: - name - description - context_prompt - Any additional context attached to the agent.

Running the Sub-Agent

The final step is to invoke the sub-agent within a prompt. You can mention it directly in Claude. For instance:

'Use the @test-automation-expert sub-agent to review my end-to-end tests.'

When the sub-agent is active, its responses and actions will be highlighted in the color you selected—in this case, purple.

Sub-agents are a powerful addition to Cloud Code. However, as the tool becomes more intelligent, it may also become more expensive in terms of token usage.

Join the 10xdev Community

Subscribe and get 8+ free PDFs that contain detailed roadmaps with recommended learning periods for each programming language or field, along with links to free resources such as books, YouTube tutorials, and courses with certificates.

Recommended For You

Up Next