ao open command opens one or more agent sessions in terminal tabs, providing quick access to running agents.
Syntax
Arguments
Session name, project ID, or “all” to open everything. If omitted, opens all sessions.
Options
Open sessions in a new terminal window instead of tabs
Behavior
The command accepts three types of targets:- Specific session - Opens a single session by name (e.g.,
ao open my-app-1) - Project ID - Opens all sessions for a project (e.g.,
ao open frontend) - “all” or omitted - Opens all sessions across all projects
Terminal Integration
On macOS, the command uses the iTerm2 terminal plugin via theopen-iterm-tab script to open sessions in tabs or windows. If iTerm2 integration is not available, it displays tmux attach commands as a fallback.
Examples
Open a specific session
my-app-1 in a new terminal tab.
Open all sessions for a project
frontend project prefix (e.g., fe-1, fe-2, fe-3).
Open all sessions
Open in a new window
Output
The command displays the status of each session as it opens:Error Handling
Unknown target
Unknown target
Error:
Unknown target: xyzCause: The specified target is not a session name, project ID, or “all”.Solution: Run ao status to see active sessions and project IDs, then specify a valid target.No sessions to open
No sessions to open
Message:
No sessions to open.Cause: No sessions are running for the specified target.Solution: Start sessions with ao spawn before trying to open them.Prerequisites
- iTerm2 (macOS only) - For automatic tab/window opening
- tmux - All sessions run in tmux
- open-iterm-tab script - Must be in PATH for terminal integration
Related Commands
ao status- View all active sessionsao session ls- List sessions with metadataao spawn- Create new sessions to open
