Use subagents for isolated work
Ask Embedder to delegate work when an investigation would consume substantial context or when several independent questions can run at the same time:Subagent types
- Codebase explorer reads and searches the codebase.
- Document explorer searches uploaded hardware documentation and datasheets.
- Web searcher researches current information on the web.
- Planning agent reads the project and prepares an implementation plan.
- General can read, search, edit files, run shell commands, use the web, and use hardware tools. You can turn hardware access off with
/subagent-hardware.
Approvals inside a general subagent
A general subagent follows the same tool approval rules as the parent session:- Shell commands on your approvals allowlist run without asking.
- Any other shell command, file write, or path outside the project raises the normal confirmation card. The card appears in the main chat, labeled with the subagent’s name, and the subagent waits until you answer. See Approvals from subagents.
- Approving lets the tool proceed. Rejecting without a reply aborts the subagent’s turn; in VS Code you can reply with what to do instead, and the subagent continues.
- Your
allowOutsideProjectgrants apply, so a trusted toolchain directory outside the project works in a subagent without extra prompts.
npm run build or bun test. The command asks for confirmation exactly as it would in the main session instead of being refused. Hardware access is governed separately by the hardware toggle below. When the toggle is off, hardware calls stay denied regardless of approvals.
Runtime limits
A subagent has no fixed runtime limit. It runs until it finishes, you stop it, or the parent turn is cancelled. Embedder treats a subagent that produces no activity for an extended period as stalled and stops it.Run subagents in the background
For long work that the parent does not need immediately, Embedder can start a general subagent in the background. The dispatch returns a task ID immediately, the subagent keeps working after the turn ends, and Embedder inserts its result into the parent conversation when it finishes. A background subagent keeps a durable identity. Embedder can:- Check its status and read its latest progress.
- Send it a message to steer the current turn or start a follow-up turn on the same child session.
- Interrupt it without destroying the child session or its transcript.
Control subagent hardware access
General subagents have hardware access by default. They can use hardware tools and run hardware commands through the shell. Every hardware request goes through the same lease queue as the parent session and other subagents. One agent drives a board at a time, and the others wait until the board is free. Toggle hardware access off or back on with:Long shell commands become background tasks
Shell commands use the same task model as subagents. When Embedder runs a command:- Embedder registers the command as a task and captures its output to a log file from the start.
- Embedder observes the command in the foreground for one minute.
- If the command finishes within that window, Embedder returns the result inline.
- If it is still running, the same process moves to the background without restarting, and Embedder receives its task ID.
A hardware command keeps the board leased to its session until the command
exits, including after it moves to the background. Flash commands and
commands that disconnect serial monitors always stay in the foreground. See
Hardware scripts.
View and manage background tasks
The background task view lists every running and finished task in the session: backgrounded shell commands and background subagents. Open it in the terminal UI with/background.
From the conversation, ask Embedder to:
- List the running background tasks.
- Report the status or latest output of a task by ID.
- Stop a task. Stopping a shell task terminates its process tree. Stopping a subagent interrupts its turn but keeps the child session and transcript.
Parallelize with subagents
For ad hoc parallel work, use subagents:- Dispatch several read-only subagents in one message when you have independent questions. They run concurrently.
- Use a general subagent for an autonomous implementation task, in the foreground or the background.
- Keep tightly coupled edits in the parent session.

