Skip to main content
Spawning agents is the core workflow in Agent Orchestrator. Each agent gets an isolated workspace, its own git branch, and autonomously works on code changes.

Basic Spawning

Spawn a single agent for an issue:
This command:
  1. Creates an isolated git worktree from your default branch
  2. Creates a feature branch (e.g., feat/123)
  3. Starts a tmux session for the agent
  4. Launches the AI agent with issue context from your tracker
  5. Writes session metadata for tracking
The issue identifier format depends on your tracker:
  • GitHub: #123 or just 123
  • Linear: INT-1234 (team prefix + number)
  • Ad-hoc: Any string becomes the branch name

Spawning with Issue IDs

GitHub Issues

The agent fetches issue details via the GitHub CLI (gh) and uses the title and description as context.

Linear Issues

Configure Linear in your project:
Then spawn:

Ad-hoc Tasks (No Issue)

Spawn without an issue ID for exploratory work:
The agent starts with a generic prompt. Send it instructions:

Batch Spawning

Spawn multiple agents in parallel with duplicate detection:
Features:
  • Duplicate detection: Skips issues that already have active sessions
  • Same-batch deduplication: Won’t spawn duplicates within the batch
  • Parallel execution: Creates sessions with 500ms delay between each
  • Summary report: Shows created, skipped, and failed sessions
Output:

Agent Selection

Override the default agent per-session:
Available agents:
  • claude-code (default) — Anthropic Claude with Code mode
  • codex — OpenAI Codex
  • aider — Aider coding assistant
  • opencode — OpenCode agent
Uses Claude’s native coding mode. Best for complex reasoning and multi-file changes.

Custom Prompts

Using Ad-hoc Sessions

For work without a tracked issue:

Agent Rules (Per-Project)

Define rules that apply to all agents in a project:
Or reference an external file:
Example .agent-rules.md:

Opening Sessions in Terminal

Automatically open spawned sessions in terminal tabs:
This uses the Terminal plugin (default: iterm2) to create a new tab and attach to the tmux session. Manual attachment:

Session Output

When a session is created, you’ll see:
The SESSION= line is for scripting:

Pre-flight Checks

Before spawning, the CLI validates:
1

Runtime availability

If using tmux runtime, checks that tmux is installed:
2

Tracker authentication

For GitHub tracker, validates gh CLI authentication:
3

Project configuration

Ensures the project exists in agent-orchestrator.yaml:
Common errors:
“tmux not found”Install tmux:
“gh auth failed”Authenticate the GitHub CLI:

Advanced: Session Prefixes

Control session naming with prefixes:
Resulting sessions: fe-1, api-1, mob-1 This helps when managing multiple projects:

Next Steps

Managing Sessions

List, attach, send messages, and kill sessions

Auto-Reactions

Configure automatic CI failure and review handling