Branch mode runs an AI agent session without creating a git worktree. Instead of spinning up a separate working directory, it checks out a branch in your current checkout. The result is faster setup and zero extra disk usage -- at the cost of the parallel isolation that worktrees provide.
Branch mode is ideal for quick, single-track work. Worktrees remain the right choice when you need multiple isolated working trees running at the same time.
Creating a Branch Session
There are two equivalent ways to start a branch session:
# Dedicated command
owt branch "fix the flaky login test"
# Or the new command with the --in-place flag
owt new "fix the flaky login test" --in-placeBoth check out a new branch in the current working directory and launch the agent there -- no separate worktree directory is created on disk.
You can also choose branch mode interactively: in the control plane, press n to create a session and you will be prompted to pick "worktree vs branch".
Worktree vs Branch
| Aspect | Worktree (default) | Branch mode |
|---|---|---|
| Working directory | A new, separate directory | The current checkout (shared) |
| Disk overhead | Full working tree per session | None |
| Setup speed | Slower (clone-like setup) | Faster |
| Parallel isolation | Full -- many run side by side | None -- one branch session per directory at a time |
| Best for | Multiple simultaneous tasks | Quick, single-track work |
Because branch mode shares one working directory, only one branch session can be checked out in that directory at a time. There is no true parallel isolation like worktrees provide. Reach for worktrees when you need several simultaneously isolated working trees; reach for branch mode for fast, low-overhead single-track work.
How Sessions Are Recorded
Internally the SessionType enum has two values, WORKTREE and BRANCH, and every status row carries a session_type field. Branch-mode sessions live only in the status database -- there is no separate worktree on disk to reconcile against.
Command Behavior for Branch Sessions
Branch sessions are first-class across the CLI. The merge, ship, send, switch, and delete commands all work on them by falling back to the status DB when WorktreeManager.get raises (because there is no worktree to look up):
| Command | Branch-mode behavior |
|---|---|
owt merge | Merges the branch session's branch |
owt ship | Commits, merges, and tears down the branch session |
owt send <name> | Falls back to the status DB to find the recorded backend |
owt switch <name> | Attaches via the recorded backend |
owt delete <name> | Routes through branch teardown (delete_branch=True, pop_stash=True) |
owt doctor | Reconciles branch rows against git branch --list, never the worktree list |
Because owt doctor checks branch rows against git branch --list rather than the worktree list, a healthy in-place branch session is never flagged as an orphan.
When to Choose Branch Mode
Choose branch mode when:
- You want to start an agent quickly with no per-session disk cost.
- You are working on a single task at a time in this directory.
- You do not need to run multiple isolated working trees in parallel.
Choose worktrees (the default) when you need several tasks running in parallel, each with its own isolated working directory.
See Also
- Git Worktrees -- The default isolation model and its trade-offs
owt branch-- Create a branch sessionowt new-- Create a worktree (or a branch session with--in-place)