Skip to content

The wait command polls a worktree's status until the agent reaches WAITING or COMPLETED state, or until a timeout is reached. Designed for CI/CD pipelines and scripted workflows where you need to block until an agent is done.

Usage

bash
owt wait <worktree_name> [OPTIONS]

Arguments

ArgumentDescription
worktree_nameName of the worktree to wait on

Options

OptionDefaultDescription
--timeout <seconds>600Maximum wait time in seconds
--poll <seconds>10Poll interval in seconds
--jsonOutput result as JSON

Examples

Basic Wait

bash
owt wait auth-jwt

Polls every 10 seconds until the agent finishes (up to 10 minutes).

Extended Timeout

bash
owt wait my-feature --timeout 1200

Wait up to 20 minutes for a complex task.

CI/CD Usage

bash
owt new "Run security audit" --headless
owt wait security-audit --timeout 900 --json

Creates a worktree without tmux (headless), then blocks until the agent completes. JSON output for pipeline parsing.

Exit Codes

CodeMeaning
0Agent finished (WAITING or COMPLETED)
1Timeout reached or error

See Also