Skip to content

The attach command hands you off to a worktree's agent session, hosted by whichever multiplexer backend that worktree was created with. By default it reads the recorded backend from the status database, so you do not need to repeat any backend flags.

Usage ​

bash
owt attach <name> [OPTIONS]

Arguments ​

ArgumentDescription
nameWorktree name (or matching identifier) of the session to attach to

Options ​

OptionDescription
--herdrForce the herdr backend, overriding the recorded one
--tmuxForce the tmux backend, overriding the recorded one

Behavior ​

owt resolves the session from the status database. Each worktree records its backend at create-time (backend_kind, backend_session_id, and backend_meta, including the exact herdr socket for custom deployments), so a plain owt attach <name> always routes to the right surface:

  • A worktree created with tmux attaches via tmux (tmux attach).
  • A worktree created with --herdr attaches via herdr (herdr agent attach <pane_id>), using the recorded socket.

Forcing a Backend ​

When you pass --tmux or --herdr and it differs from what was recorded, owt does not coerce the recorded session id (tmux session names and herdr pane ids are different shapes -- coercing would silently misroute). Instead it re-resolves the session via backend.session_for(name) on the forced backend.

If the forced backend has no session for that worktree, owt errors clearly rather than failing later in the attach handshake:

No herdr session for 'my-feature'. Recorded as tmux.

Examples ​

Attach Using the Recorded Backend ​

bash
owt attach my-feature

Force herdr ​

bash
owt attach my-feature --herdr

Force tmux ​

bash
owt attach my-feature --tmux

See Also ​