Skip to content

The new command creates a new git worktree with automatic environment setup, tmux session creation, and AI tool launch. You provide a task description and Open Orchestrator handles the rest -- including generating a branch name from your description.

Usage

bash
owt new "task description" [OPTIONS]

Alias: owt n

Arguments

ArgumentDescription
"task description"A quoted string describing the task (used to auto-generate branch name)

Options

Branch Options

OptionDescription
-b, --base <branch>Base branch to create from (default: current branch)
--branch <name>Override auto-generated branch name
--prefix <prefix>Override branch prefix (default: based on template)

AI Tool Options

OptionDescription
--ai-tool <tool>AI tool to start: claude, opencode, droid (default: claude)
--plan-modeStart Claude in plan mode (safe exploration)
--workflowLaunch a native plan-first Claude Code workflow (plan mode + plan-then-execute protocol). Implies --plan-mode. Requires a plan-mode-capable tool (e.g. claude) and cannot be combined with --headless.

Template Options

OptionDescription
-t, --template <type>Worktree template: feature, bugfix, hotfix

Session Options

OptionDescription
-a, --attachAttach to the tmux session after creation
--headlessCreate worktree without tmux session (CI/script use)
-y, --yesSkip confirmation prompt

Examples

Basic Usage

bash
# Create a worktree for a new feature
owt new "add user authentication with JWT tokens"

This will:

  • Generate branch name: feature/add-user-authentication-with-jwt-tokens
  • Create the worktree, install deps, start Claude with the task

With a Specific Base Branch

bash
# Branch off develop instead of main
owt new "fix pagination bug on search results" --base develop

With a Custom Branch Name

bash
owt new "implement OAuth2 login flow" --branch feature/oauth2-login

Using Templates

bash
# Bugfix template (uses bugfix/ prefix)
owt new "fix memory leak in WebSocket handler" --template bugfix

# Hotfix template (uses hotfix/ prefix)
owt new "patch critical XSS vulnerability" --template hotfix

With a Different AI Tool

bash
# Use OpenCode instead of Claude
owt new "build REST API endpoints" --ai-tool opencode

# Use Droid
owt new "refactor database layer" --ai-tool droid

Plan Mode

bash
# Start Claude in plan mode for exploration
owt new "research best approach for migrating to PostgreSQL" --plan-mode

Plan-First Workflow

bash
# Launch a native plan-first Claude Code workflow (plan mode + plan-then-execute)
owt new "Refactor the billing module" --workflow

--workflow implies --plan-mode, requires a plan-mode-capable tool (e.g. claude), and cannot be combined with --headless.

Attach Immediately

bash
# Create and jump straight into the tmux session
owt new "add dark mode support" --attach

Headless Mode (CI/CD)

bash
# Create worktree without tmux session
owt new "Run security audit" --headless

# Then wait for it to finish
owt wait security-audit --timeout 1200

Skip Confirmation

bash
owt new "update API documentation" --yes

What Happens

When you run owt new "add user authentication":

  1. Branch Name Generated

    • Task description is converted to a branch name
    • Example: feature/add-user-authentication
    • Prefix determined by template (default: feature/)
  2. Git Worktree Created

    • Directory created based on naming pattern
    • Branch created from base (default: current branch)
  3. Project Detected

    • Identifies project type (Python, Node, Rust, Go, PHP)
    • Identifies package manager
  4. Dependencies Installed

    • Runs appropriate install command
    • Examples: npm install, uv sync, cargo build
  5. Environment Copied

    • Copies .env file from main worktree
    • Adjusts relative paths as needed
  6. tmux Session Created

    • Session name: owt-<worktree-name>
    • Working directory set to worktree path
  7. Keybindings Installed

    • Alt+s to return to the Control Plane
    • Alt+m to merge current worktree
    • Alt+d to delete current worktree
    • Alt+c to create new worktree
  8. Status Hooks Installed

    • For Claude Code and Droid, lifecycle hooks are installed into the worktree's local settings
    • Hooks push real-time status updates (WORKING, WAITING, BLOCKED) to the Control Plane
  9. AI Tool Started

    • Launches chosen AI tool in the session
    • Sends the task description as the initial prompt

Output

✓ Creating worktree for: add user authentication
✓ Branch: feature/add-user-authentication
✓ Detected project type: node (npm)
✓ Installing dependencies...
✓ Copying .env file
✓ Created tmux session: owt-add-user-authentication
✓ Started Claude Code
✓ Sent task to AI agent

Worktree created successfully!
  Path: /Users/you/projects/my-app-add-user-authentication
  Branch: feature/add-user-authentication
  tmux: owt-add-user-authentication

Configuration

Default behavior can be configured in .worktreerc:

toml
[worktree]
base_directory = "../"
naming_pattern = "{project}-{branch}"

[tmux]
auto_start_ai = true
ai_tool = "claude"

[environment]
auto_install_deps = true
copy_env_file = true

See Also