Subagent Swarms
term2 features a modular subagent execution system that isolates computational, search, or modification workloads from the main conversation transcript.
Subagent Roles
Section titled “Subagent Roles”Subagents run under distinct role profiles with explicit permission boundaries and execution limits:
1. Explorer
Section titled “1. Explorer”- Purpose: Fast codebase reconnaissance, symbol lookup, file discovery, and dependency mapping.
- Permissions: Read-only (
canRead: true,canWrite: false,canSearchWeb: true,canRunShell: true). - Safety: Restricted to read operations and non-destructive shell commands (
rg,fd,git status). - Default Model Tier:
agent.cheapModel(fast and token-efficient).
2. Worker
Section titled “2. Worker”- Purpose: Autonomous implementation of discrete tasks, writing file patches, refactoring, and running tests.
- Permissions: Read/Write (
canRead: true,canWrite: true,canRunShell: true). - Safety: Sandboxed to the workspace root. Supports Git worktree isolation to keep experimental work separate from the main branch.
- Default Model Tier:
agent.balancedModel.
3. Mentor
Section titled “3. Mentor”- Purpose: High-level architectural consultation and second-opinion code review.
- Permissions: Advisory only (
canRead: false,canWrite: false,canRunShell: false). - Safety: Receives questions via the
ask_mentortool and returns structured recommendations without polluting turn history. - Default Model Tier:
agent.smartModel.
4. Librarian
Section titled “4. Librarian”- Purpose: Persistent memory management, domain documentation indexing, and cross-session retrieval.
- Permissions: Memory tools and skills only. No general filesystem or shell access.
- Default Model Tier:
agent.cheapModel.
5. Reviewer
Section titled “5. Reviewer”- Purpose: Independent review of a change, plan, or design, using explorers to gather evidence before reporting concrete findings.
- Permissions: Delegation is limited to bounded read-only explorers; the reviewer does not edit the workspace.
- Default Model Tier:
agent.smartModel.
Model Capability Tiers
Section titled “Model Capability Tiers”Subagent roles are mapped to configurable tiers in your settings:
agent.smartModel/agent.smartProvider: High-reasoning model for complex architecture, mentor advisory, and planning.agent.balancedModel/agent.balancedProvider: General implementation model for code writing and edits. Multiple models form a round-robin pool for subagent spawns.agent.cheapModel/agent.cheapProvider: Fast, lightweight model for high-volume searches and indexing. Multiple models form a round-robin pool for subagent spawns.agent.choreModel/agent.choreProvider: Narrow utility model for patch self-healing and auto-approval evaluation.
Pool values are configured in the settings UI or as arrays in the corresponding tier settings. Non-subagent consumers use the first configured model.
Background Task Manager (Ctrl+G)
Section titled “Background Task Manager (Ctrl+G)”Subagents can execute synchronously in the foreground or asynchronously in the background.
- Press
Ctrl+Gto open the Background Task Manager. - Use
UpandDownarrow keys to browse active and completed tasks. - Press
Enterto inspect output streams and execution logs. - Press
b+Enteron a foreground task to move it to the background. - Press
x+Enteron a running background task to request a graceful stop. - Press
Ctrl+GorEscapeto close the manager.
Background Check-Ins
Section titled “Background Check-Ins”The background check-in scheduler periodically notifies the parent agent when background tasks finish or require input, ensuring you are updated without manual polling.