Subagents
A subagent is a separate Veyyon session started by your session to execute one scoped
assignment and return a result. The parent starts it with the task tool. Because each
subagent runs in its own context window, broad file exploration and multi-step edits stay
out of your main conversation history.
Subagent policy is configured in /settings → Subagents (subagent.*); /settings subagents
opens that tab directly. Helper models used by built-in features (advisor, plan,
vision, commit, title, memory, autoThinking, unexpectedStop, speech,
completion) are configured in /settings → Model → Helpers (agent.helpers).
/subagents opens the live dashboard for subagents running or asleep in the current session
and does not edit settings.
Default configuration
On a stock profile, delegation is preferred, deep is available for autonomous
delegation, and the remaining bundled subagents run when mentioned:
subagent:
delegation: preferred
| Bundled subagent | Default availability | Capability marks | Role on the cost ladder |
|---|---|---|---|
deep | auto (Automatic) | reads · runs · edits · spawns | End-to-end worker for multi-file or ambiguous tasks that require investigation, edits, and verification. |
quick | mention (On mention) | reads · runs · edits | Contained edit or verification pass when the target files and approach are already known. |
scout | mention (On mention) | reads | Read-only codebase reconnaissance and symbol lookup. |
reviewer | mention (On mention) | reads · runs | Diff and code review with command execution and no file edits. |
librarian | mention (On mention) | reads · runs | Multi-repository and documentation research without file edits. |
designer | mention (On mention) | reads · runs · edits | UI layout, styling, and accessibility implementation and review. |
With only deep set to auto, the task tool description includes one subagent by default
instead of every specialist. You invoke any mention subagent for one turn by writing
@quick, @scout, @reviewer, @librarian, or @designer in your prompt, or by
running a slash command such as /review that grants reviewer for that turn.
Delegation strength
subagent.delegation (How Much to Delegate under Delegation) controls how strongly the
system prompt instructs the model to delegate to auto subagents:
| Value | Label in Settings | Effect |
|---|---|---|
allowed | Optional | The task tool is available; the system prompt does not push for delegation. |
preferred | Encouraged | Default. The system prompt instructs the model to delegate substantial eligible work. |
required | Expected | Same as preferred, plus a first-turn reminder. |
subagent.enabled (Use Subagents, default true) is the master toggle. Setting subagent.enabled: false
removes the task tool and all delegation instructions from the session.
A subagent definition is routing and tool-selection configuration, not a security boundary. Use the sandbox to restrict filesystem or process access.
Availability and @ mentions
subagent.agents stores per-subagent overrides keyed by subagent name. In /settings →
Subagents, the Manage Subagents row opens the roster, where every discovered subagent
appears with its availability, resolved model, and capability marks (reads, runs, edits, spawns).
Press Space on a subagent row to cycle availability, or press Enter to open the
subagent’s page (summary, file path, Availability, Model, Effort, Model for Subagents It Spawns, tools, output fields, prompt preview, e to edit in $EDITOR, d to
duplicate as a user subagent). Select + New subagent… to generate and save a new user
subagent in ~/.veyyon/subagents/<name>.md (see Writing a subagent).
| Availability | Label in Settings | Effect |
|---|---|---|
auto | Automatic | Listed in task; the model may spawn it on its own, and @ mentions or commands also start it. Default for deep. |
mention | On mention | Omitted from task until @<agent> in your message or a command grant enables it for that turn. Default for all other bundled, user, and plugin subagents. |
off | Off | Blocked everywhere. Neither the model, an @ mention, nor a command can spawn it. |
Writing @<agent> in a message grants that subagent for the turn that message starts and
appends a hidden turn notice with the subagent’s summary and capability marks. Writing
@<model>[:<effort>] after an @<agent> mention in the same sentence binds that model
(from subagent.modelShortcuts, an exact provider/model id, or a catalog match) and
optional effort to that subagent for the turn:
@reviewer @strong check the migration diff for data loss
Plain prose without @ (“use the scout subagent”) does not grant a mention subagent; if
scout is mention, that spawn attempt fails and states the setting or @scout syntax
needed to run it.
Loading subagent definitions
subagent.loading (Subagent Descriptions under Delegation in /settings → Subagents)
controls how much text each auto subagent contributes to the task tool description:
| Value | Label in Settings | task tool description content |
|---|---|---|
full | Full | Default. Full description and read-only/command marker for each auto subagent. |
summary | One line each | One line per auto subagent (name, capability marks, summary). Mentioning a subagent injects its full description for that turn. |
When a spawned subagent starts, it always loads its full system prompt, skills, and rules.
Choosing models and effort
A subagent’s model resolves from the first layer below that specifies one:
- A
modelpassed on thetaskcall or bound by an@mention in your message (governed bysubagent.modelChoice). - The subagent’s lane in
subagent.agents.<name>.modelfor a direct spawn, or the matching nested level undersubagent.agents.<name>.agents(Its Own Subagents on the subagent’s page) for a deeper spawn. - Default Subagent Model (
subagent.defaultModel). - The subagent definition’s
model:frontmatter. - The spawning session’s live model.
Setting inherit on a lane or on subagent.defaultModel selects the spawning session’s
live model, overriding any model: in the subagent’s frontmatter.
Effort resolves in the same order: effort on the task call or @ mention, the
subagent’s lane thinkingLevel, Default Subagent Effort (subagent.defaultEffort), the
definition’s thinkingLevel: frontmatter, and finally the spawning session’s live
effort clamped to the levels the resolved model supports. An explicit :<effort> suffix
on the winning model selector takes precedence over every separate effort setting.
subagent:
defaultModel: openai/gpt-5
defaultEffort: medium
modelShortcuts:
fast: anthropic/claude-haiku-4-5:low
strong: anthropic/claude-opus-4-5:high
modelChoice: shortcuts
agents:
reviewer:
availability: mention
model: strong
Model shortcuts and per-call model choice
Model Shortcuts (subagent.modelShortcuts) maps short names such as fast, strong,
or local to model chains. Shortcut names work in @<shortcut> mentions, in subagent
model settings, and in task calls.
Choosable Models (subagent.modelChoice) controls whether the parent model can
pass model and effort arguments on task calls, and model on eval agent() calls:
off:modelandeffortare omitted from thetasktool schema and from the evalagent()signature, and a call that passes them is rejected (models bound by your@mentions still work for that turn).shortcuts(default):modelaccepts keys defined insubagent.modelShortcuts.any:modelaccepts any shortcut orprovider/modelselector.
Fallback chains
subagent.defaultModel, subagent.modelShortcuts.<name>, and subagent.agents.<name>.model
accept a comma-separated string or a YAML list:
subagent:
agents:
reviewer:
model:
- anthropic/claude-opus-4-5
- openai/gpt-5
The first entry is primary; remaining entries are runtime retry fallbacks if the active provider errors mid-run. If a configured selector matches no available model at spawn time, Veyyon rejects the spawn and states the setting to fix instead of silently falling through.
In the Subagents block above the composer, a subagent running on a fallback entry displays
↓ before its model badge.
Legacy settings migration
Legacy configurations migrate on load:
agent.agents.<name>.enabled: truebecomesavailability: auto;enabled: falsebecomesavailability: off.agent.agents.sonicrenames tosubagent.agents.quick.- The legacy config key
agent.sharedModel: truecopiesagent.modelandagent.thinkingLevelintosubagent.defaultModelandsubagent.defaultEffortand clears inactive per-subagent model and effort fields, saving a backup copy first.agent.sharedModel: falsedrops the inactive shared fields.
On the first interactive launch after migration, Veyyon displays a one-time summary card
listing renamed entries, newly mentionable subagents, any cleared values with the backup
file path, and Enter to open /settings → Subagents.
Watching a run
While spawns are running, the Subagents block renders above the composer with one row per
subagent: rail, status mark, agent id, assignment label, and resolved model/effort badge.
Subagents
▏ ▪ DockerSecretHarness: Run the workspace tests in Docker · claude-opus-5 high
▏ ▪ SecretModeFlowUX: Review the secret mode flow · claude-opus-5 high
▏ ▪ SecretModularityAudit: Audit secrets subsystem modularity · gemini-3.7-flash med
The assignment label uses the spawn description, or a title generated via the title
helper (agent.helpers.title, falling back to the session model). The model badge shows
the resolved subagent.defaultModel or per-subagent model when set, or the inherited session
model. Set subagent.showResolvedModelBadge: false to hide the badge.
When display.transitions is enabled, light animates down the rail while subagents run. At
narrow terminal widths, the model badge drops first and the label truncates; rows never
wrap. Up to eight rows render inline, with an overflow footer pointing to /subagents when
more than eight subagents are active.
Limits and isolation
Remaining sections on /settings → Subagents control concurrency (subagent.maxConcurrency),
nesting (subagent.maxNestedSpawnDepth), runtime and retry limits, request budgets, idle
sleep (subagent.idleTtlMs), worktree isolation (subagent.isolation.*, see
Safety), and inter-agent coordination (irc.timeoutMs).
Running, idle, asleep
A subagent has one of three states:
running: a turn is in flight.idle: the turn finished and the session remains in memory.asleep: the in-memory session was released and its transcript is on disk.
An idle subagent transitions to asleep after subagent.idleTtlMs (Sleep Idle Subagents
After, default 5 minutes), releasing its session, MCP clients, and memory after
flushing its transcript. Setting 0 (Never) keeps idle subagents in memory until exit.
Messaging or opening an asleep subagent wakes it from its on-disk transcript, except for
isolated-worktree subagents whose temporary worktree was removed on completion (their
transcripts remain readable via history://<id>).
Stopping a subagent
Pressing x in /subagents, calling job cancel, or stopping a subagent from collab aborts
its active turn and puts both the subagent and any children it spawned to sleep.
Live subagent list
irc list returns all running and idle subagents plus the ten most recently active
asleep subagents. Older asleep subagents remain addressable by id. /subagents lists every
subagent in the session.
Idle timer rules
The idle timer counts from last activity and resets on wake. Viewing a subagent in
/subagents defers sleep until Esc returns to the main session. Background jobs started
by a subagent defer sleep in subagent.idleTtlMs increments until those jobs finish. If
flushing the session to disk fails, the subagent stays in memory and retries on the next
interval.
Nesting depth
subagent.maxNestedSpawnDepth defaults to 0 (Off), meaning direct children
cannot spawn further subagents. 1 allows one nested level, and -1 allows unlimited
nesting. Per-subagent overrides are configured at subagent.agents.<name>.maxNestedSpawnDepth or
Its Own Subagents on the subagent’s page:
subagent:
maxNestedSpawnDepth: 0
agents:
deep:
maxNestedSpawnDepth: 1
Working directory isolation
Calling set_cwd inside a spawned subagent updates only that subagent’s working directory and
system prompt without changing process.cwd() or any sibling session. Project settings
and plugins remain those loaded for the host process.
The complete setting key table is in the settings reference.