The switch command jumps to a worktree's tmux session. If you are already inside tmux, it switches the client. If you are outside tmux, it attaches to the session.
Usage
bash
owt switch <name>Alias: owt s
Arguments
| Argument | Description |
|---|---|
name | Worktree name, branch name, or partial match |
Name Resolution
The switch command supports flexible name matching:
- Full worktree name:
add-auth - Full branch name:
feature/add-auth - Partial match:
auth(if unique among worktrees)
If a partial match is ambiguous, an error is shown with all matching worktrees.
Examples
Switch to a Worktree
bash
owt switch add-authUsing Branch Name
bash
owt switch feature/add-authPartial Match
bash
# If "auth" uniquely matches one worktree
owt switch authBehavior
Inside tmux
When you are already in a tmux session (e.g., another worktree or the Control Plane), owt switch uses tmux switch-client to move you to the target session without detaching.
Outside tmux
When called from a regular terminal, owt switch attaches to the target worktree's tmux session. Detach with Ctrl+B, D to return to your terminal.
Error Handling
Worktree Not Found
Error: Worktree 'nonexistent' not foundCheck available worktrees with owt list.
Ambiguous Name
Error: Multiple worktrees match 'auth':
- feature/add-auth
- bugfix/auth-issueUse a more specific name to disambiguate.
See Also
owt(Control Plane) -- Visual worktree navigationowt list-- List all worktreesowt send-- Send messages to a worktree's AI agent