Custom Agents
A subagent is a separate worker Command Code hands a task to. It runs in its own context window with its own tools, system prompt, and (optionally) its own model. Command Code can run several at once, so work like editing three modules can happen in parallel instead of one at a time.
Three built-in agents are always available: General, Explore, and Plan. You can add your own as Markdown files.
The fastest way to make a subagent is to ask for one:
Command Code writes the agent file for you. From then on it delegates to that agent when the task matches.
To manage agents yourself, run:
That's it for getting started. The rest of this page covers making agents by hand, how delegation works, and the full file reference.
These ship with Command Code and are always available. They're read-only - you can't edit or delete them.
| Agent | When it runs | Tools |
|---|---|---|
| General | The default when no other agent fits. Research and multi-step tasks. | All tools |
| Explore | Codebase search and understanding that touches many files. | Read-only: read_file, read_directory, grep |
| Plan | Designing an approach and weighing trade-offs. | read_file |
When Command Code delegates without naming an agent, the task goes to General.
Describe the agent in plain language, as shown in Quick start. Command Code drafts the name, description, system prompt, and a sensible tool set, then saves the file. You review and adjust.
Choosing Create agents with Command Code in the /agents menu shows the same thing - it points you back to just asking: