How each harness starts and configures subagents, what they can see and change, which lifecycle hooks run, and how their transcripts are saved and read.
Worktrees: creation, setup, integration and cleanup
Starting one
| Question | Cursor Agentchecked at 2026.10.12-d47ca18 |
|---|---|
| Is there one, and how does it start | Yes. The agent launches subagents on its own through its Task tool when a task is complex, guided by each subagent's Subagents have been available in the CLI (interactive and headless |
| Built-in subagents | Two built-ins are documented: Explore, which searches and analyzes the codebase using a faster model so it can run many searches in parallel, and Browser, which drives a browser through MCP tools and filters noisy DOM snapshots and screenshots down to what matters. The agent uses them automatically. In the CLI you can set Explore's model to default, inherit, a specific model, or disabled from Hook payloads also report general Task subagent types such as |
| Define your own | Create a Markdown file with YAML frontmatter followed by the prompt. Project subagents go in Plugins installed with In CLI 2026.10.12, project subagents load from |
| What a definition can set | Partly Documented frontmatter fields are CLI 2026.10.12 also accepts Cursor may substitute another model if a team admin blocks the configured one, your plan lacks it, or a legacy plan needs Max Mode. |
While it runs
| Question | Cursor Agentchecked at 2026.10.12-d47ca18 |
|---|---|
| What it sees, and what comes back | A subagent starts with a clean context and does not see your conversation history; the parent must put everything it needs into the task prompt. It inherits the parent's tools, including MCP tools, and in the CLI also your credentials, rules and approval policy. Only its final message comes back to the parent, or an error status if it fails, along with an agent ID you can use to resume it with its context intact. |
| Several at once | Yes. The agent sends several Task tool calls in one message and they run at the same time; you can prompt for it, for example "Review the API changes and update the documentation in parallel". No concurrency cap is documented, but each subagent uses its own tokens, so five parallel subagents cost roughly five times as much. Parallel subagents share your checkout by default and can overwrite each other's edits unless you ask for isolation. |
| Keep working while it runs | Yes. A background subagent returns control immediately and keeps working while you continue; set |
| Your checkout or its own copy | Partly By default, subagents edit the parent's checkout directly, so parallel subagents can overwrite each other. If you ask for isolation ("... each in its own environment"), each subagent gets its own branch, either in a Git worktree on the same machine or in a cloud VM with a fresh clone, and its changes stay on that branch until the parent merges them. In the CLI you can also isolate the whole session with In CLI 2026.10.12, per-subagent isolation sits behind a feature flag that is off by default, so it may not be available in every CLI session. |
| Its permissions | Partly Subagents run under the parent session's approval policy, sandbox setting and Run Everything ( |
| Subagents of subagents | Partly Yes, one level deep. Since Cursor 2.5, the main agent and its direct subagents can launch subagents, but a subagent started by another subagent cannot launch any more. Nested launches also need Task tool access in the current mode, and hooks or tool policies can block them. |
Watching and handing off
| Question | Cursor Agentchecked at 2026.10.12-d47ca18 |
|---|---|
| Watch, steer or stop one | In the interactive CLI, each running subagent appears as a live row showing its status, streamed activity and token count, and running subagents also appear in the jobs list. Press There is no documented way to message a running subagent directly; steering with Enter goes to the main agent's active turn. ACP clients that advertise the |
| Hand work to a cloud agent | Yes. In the CLI, start any message with Cloud subagents use your team's MCP configuration at cursor.com/agents, not your local servers.
|
Notes and sources
Cursor Agent, 6 sources
- Shared-checkout parallel edits can overwrite each other; isolation must be requested.
- /in-cloud routes the next task to a cloud subagent with its own VM and branch; /babysit runs a cloud subagent against a pull request.
- Cloud subagents use team MCP configuration from cursor.com/agents rather than the local session.
- Subagent cloud handoff returns a result to the parent and is distinct from the & prompt prefix, which transfers the whole conversation to a Cloud Agent.
Is there one, and how does it start, 2
Built-in subagents, 3
Define your own, 1
What a definition can set, 1
What it sees, and what comes back, 2
Several at once, 2
Keep working while it runs, 2
Your checkout or its own copy, 3
Its permissions, 3
Subagents of subagents, 1
Watch, steer or stop one, 2
Hand work to a cloud agent, 3
Subagent lifecycle hooks
Recorded start and stop events, with their control semantics and availability caveats. A dash means no event is recorded here. General session or tool events do not establish a dedicated subagent hook.
Which moments a hook can attach to, and what it can do there. Event names link to each harness’s documentation. “Block”, “deny” and “modify” change what the agent does; “observe only” can watch but not intervene. Where hook files live is on the Locations page.
| Moment | Cursor AgentHook commands |
|---|---|
| Hook types |
|
| Subagents | |
| Subagent starts | |
| Subagent finishes | |
Notes and sources
Cursor Agent
- Permission hooks block when output is invalid JSON or does not match the schema; crashes, timeouts and other exit codes fail open unless the hook sets failClosed: true.
- When several hooks answer, deny beats ask and ask beats allow.
- Sources run in priority order enterprise, team, project, user; project hooks run only in trusted workspaces.
- Cloud agents run only command hooks and skip sessionStart, sessionEnd, workspaceOpen, MCP and Tab hooks; no hooks run during early read-only turns.
- Cursor hooks, Documentation, checked 2026-10-15
Subagent transcripts
Child storage and parent links are described separately from the harness’s general session format. Internal and source-observed formats can change between versions; these records do not promise a stable external schema.
| Question | Cursor Agentlive-observed; checked at 2026.10.12-d47ca18 |
|---|---|
| Child transcripts and parent links | Partly Subagent transcripts are written next to their parent at |
| Session file format | Partly The session itself is a SQLite database ( The documented, stable machine format is the headless 2026-11-15 packaged-source supplement for CLI 2026.11.13-eacade1 (archive SHA-256 087220ccf1e124dcdf2753601422892042a45a2c577ef0ea25b8a5b0e47bb691): CLI chat store.db still uses SQLite blobs/meta and binary metadata; ACP independently uses acp-sessions/<id>/store.db plus meta.json. The SQLite driver can degrade to an in-memory store after failures, so successful continuation alone does not prove durable writes. The detailed record/blob survey remains pinned to 2026.10.12-d47ca18; no current runtime transcript probe or desktop survey was run. |
| What is recorded | Partly
Token counts are available to |
| Read transcripts from code | In print mode, --output-format json emits one final result object on success; stream-json emits NDJSON messages and tool events. A failed run may have no final result. --stream-partial-output adds deltas and duplicate flush events that consumers must distinguish. Session IDs support resume; native ACP has a separately scoped session/load and storage path. The output stream is not the internal SQLite or project transcript schema.
|
| Session record structure | Cursor Agent |
|---|---|
| Envelope fields | id, role, content, providerOptions |
| Record discriminator | role |
| Identifiers and lineage | agentId (chat/session id, also the directory name), latestRootBlobId, blob id, message id, toolCallId, parent conversation id (subagents/ path in JSONL transcripts) |
| Ordering | Content-addressed blobs in table blobs(id, data); the conversation is a tree reached from meta.latestRootBlobId (meta table key '0', hex-encoded JSON). A parallel JSONL transcript is append-ordered by line. |