Skip to main content
Worktree runtime uses git worktrees on your local machine. Each workspace gets its own directory, but worktrees share the same .git directory as your main checkout.

How worktrees work

A worktree is a separate directory on the same filesystem as the main repository.
  • It has its own working tree (files on disk) and checkout state.
  • It shares a .git with the main repository.
Because .git is shared, commits created in any worktree are immediately visible to your other worktrees (including your main checkout). Worktrees aren’t locked to a branch. The agent can switch branches, enter detached HEAD, or create new branches as needed. If you want to constrain branching behavior, do it via your instruction files.

Filesystem layout

Worktree workspaces are stored in ~/.mux/src/<project-name>/<workspace-name>. Example layout:
~/.mux/src/
  mux-main/
    improved-auth-ux/
    fix-ci-flakes/