Skip to main content
The ao open command opens one or more agent sessions in terminal tabs, providing quick access to running agents.

Syntax

Arguments

string
Session name, project ID, or “all” to open everything. If omitted, opens all sessions.

Options

flag
Open sessions in a new terminal window instead of tabs

Behavior

The command accepts three types of targets:
  1. Specific session - Opens a single session by name (e.g., ao open my-app-1)
  2. Project ID - Opens all sessions for a project (e.g., ao open frontend)
  3. “all” or omitted - Opens all sessions across all projects

Terminal Integration

On macOS, the command uses the iTerm2 terminal plugin via the open-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

Opens the session my-app-1 in a new terminal tab.

Open all sessions for a project

Opens all sessions with the frontend project prefix (e.g., fe-1, fe-2, fe-3).

Open all sessions

Opens every active session across all configured projects.

Open in a new window

Opens the session in a new terminal window instead of a tab.

Output

The command displays the status of each session as it opens:
If iTerm2 integration is unavailable, it provides tmux attach commands:

Error Handling

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.
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