spawn command creates new agent sessions with isolated workspaces, issue tracking integration, and automatic branch creation.
ao spawn
Spawn a single agent session.Syntax
Arguments
string
required
Project ID from your configuration
string
Issue identifier (e.g., INT-1234, #42) — must exist in your tracker
The issue must exist in your configured issue tracker (GitHub or Linear) before spawning.
Options
flag
Open the session in a new terminal tab automatically
string
Override the agent plugin (e.g., codex, claude-code, aider)
Basic Usage
What Happens During Spawn
-
Pre-flight Checks
- Validates project exists
- Checks tmux is available (if using tmux runtime)
- Verifies GitHub CLI authentication (if using GitHub tracker)
-
Workspace Setup
- Creates git worktree (or clones repo, depending on workspace plugin)
- Checks out new branch (e.g.,
int-1234-issue-title) - Isolates work from other sessions
-
Issue Fetch (if issue provided)
- Fetches issue details from tracker
- Extracts title and description
- Passes context to agent
-
Agent Launch
- Starts agent in tmux session (or process, depending on runtime)
- Provides system prompt with orchestrator context
- Gives agent the issue details and project rules
-
Session Registration
- Creates session metadata file
- Tracks session ID, project, issue, branch, and workspace path
- Makes session visible in
ao statusand dashboard
Output Example
SESSION=ma-int-1234) is for scripting — you can capture it:
Session Naming
Session IDs follow the pattern:- Project
sessionPrefix:ma - Issue:
INT-1234 - Session ID:
ma-int-1234
The session prefix is defined in your project configuration. It keeps session names short and predictable.
Branch Naming
Branches are automatically created using the issue title:- Converts issue title to lowercase kebab-case
- Prepends the issue number
- Ensures branch name is Git-safe
ao batch-spawn
Spawn sessions for multiple issues with duplicate detection.Syntax
Arguments
string
required
Project ID from configuration
string[]
required
Space-separated list of issue identifiers
Options
flag
Open all sessions in terminal tabs
Basic Usage
Duplicate Detection
The command prevents creating duplicate sessions:- Existing Sessions - Skips if a session already exists for the issue
- Same Batch - Skips duplicate issues within the same command
- Case-Insensitive - Treats
INT-1234andint-1234as duplicates
Dead sessions (killed, done, exited) are ignored — you can respawn for those issues.
Output Example
Error Handling
If some spawns fail, the command continues and reports errors at the end:Agent Override
Use a different agent for a specific session:The agent must be installed and available in your PATH. The orchestrator only handles session creation and routing.
Common Issues
Unknown Project
tmux Not Found
GitHub CLI Not Authenticated
Issue Not Found
Worktree Already Exists
Examples
Basic Spawn
Open in Terminal
Custom Agent
Batch Workflow
Scripted Spawn
Exit Codes
0- Session created successfully1- Error (project not found, tmux missing, issue not found)
Next Steps
Status
Monitor your spawned sessions
Send Messages
Interact with running sessions
Session Management
List, kill, and cleanup sessions
