仓库 →

Subagents

When a task splits cleanly — parallel edits, mechanical repetition, or read-only investigation — the main agent can hand subtasks to short-lived subagents through the task tool. Each subagent runs in its own isolated context; the main agent keeps the cross-file reasoning and owns the final result. The task tool is on by default.

Two kinds of subagent

TypeWhat it can do
exploreRead-only investigation — reads and searches the codebase to answer a “where / how” question, then returns findings. Cannot edit files.
workerExecutes a tightly-specified change. Reads freely, but its writes are confined to a declared scope.

How they run

Worker scope & safety

A worker subtask must declare a scope: a list of working-directory-relative globs it is allowed to write, e.g. ["src/auth/**", "Cargo.toml"]. This is enforced, not advisory:

Configuration

Tune the subagent pool in ~/.atomcode/config.toml:

[subagent]
max_concurrent = 3     # parallel subagents at once (min 1)
timeout_secs   = 900   # per-subtask wall-clock limit, seconds (min 30)
max_rounds     = 200   # per-subtask model-round cap (0 = unbounded)
KeyDefaultMeaning
max_concurrent3How many subagents run in parallel
timeout_secs900Wall-clock timeout per subtask (floored to 30s)
max_rounds200Model-round high-water mark per subtask; 0 = unbounded

Environment overrides: ATOMCODE_SUBAGENT_TIMEOUT and ATOMCODE_SUBAGENT_MAX_ROUNDS take precedence over the config values.

Turning it off

The task tool is enabled by default. To remove it entirely, set:

ATOMCODE_SUBAGENT=0 atomcode

Any of 0, false, or off disables it; unset (or any other value) leaves it on.

Related