| name | workmux |
| description | Reference for the workmux CLI that manages git worktrees and tmux windows as isolated development environments. Use when the user mentions workmux, worktrees, or parallel agent workflows. |
| disable-model-invocation | true |
workmux
workmux manages git worktrees paired with tmux windows for parallel development.
Each worktree is an isolated workspace with its own branch, terminal state, and
AI agent.
If the user asks you to create worktrees or dispatch tasks (e.g., "/workmux
add ..."), you are a dispatcher. Write prompt files and run commands. Do NOT
explore, read, or research the codebase first. Use context you already have. The
worktree agent does all the work.
Key Concepts
- Handle: the worktree directory name, derived from the branch name
(slugified). Used to identify worktrees in all commands
- Worktree directory: defaults to
<project>__worktrees/<handle> as a
sibling of the project root
- Window prefix: tmux windows are named
wm-<handle> by default
(configurable via window_prefix)
- Agent status: agents report status via hooks: working, waiting (needs
input), done (finished)
Commands
Create a worktree
workmux add <branch-name>
Creates a git worktree, runs file operations and hooks, creates a tmux window
with configured pane layout, and switches to it.
Key flags:
-b, --background: create without switching to it
-p <text>: inline prompt for AI agent panes
-P <file>: prompt from file
-e, --prompt-editor: write prompt in $EDITOR
-A, --auto-name: generate branch name from prompt via LLM
-a <agent>: override the agent (can specify multiple for multi-worktree)
-w, --with-changes: move uncommitted changes to the new worktree
--base <branch>: branch from a specific base
--name <name>: override the handle name
-o, --open-if-exists: open existing worktree if it exists (idempotent)
-W, --wait: block until the tmux window is closed
-n, --count <N>: create N worktree instances
--foreach <matrix>: create worktrees from variable matrix
--no-hooks, --no-file-ops, --no-pane-cmds: skip setup steps
List worktrees
workmux list
workmux list --pr
workmux list <name>
Shows branch, agent status, tmux window status, and unmerged commits.
Merge a branch
workmux merge
workmux merge <branch>
workmux merge --rebase
workmux merge --squash
workmux merge --into <branch>
workmux merge --keep
workmux merge --notification
Merges the branch, deletes the tmux window, removes the worktree, and deletes
the local branch. Use the /merge skill for the full workflow (commit, rebase,
then merge).
Remove worktrees
workmux remove
workmux remove <name>...
workmux rm --gone
workmux rm --all
workmux rm -f <name>
workmux rm --keep-branch
Open / close windows
workmux open <name>
workmux open --new
workmux open <name> -p "..."
workmux close <name>
Interact with other agents
These commands target agents by their worktree handle. If the handle is not
found in the current repo, workmux searches all active agents globally. Use
project:handle syntax to disambiguate when names collide.
workmux status
workmux status auth api-tests
workmux wait agent-a agent-b
workmux wait agent-a --timeout 3600
workmux wait agent-a agent-b --any
workmux wait agent-a --status working
workmux capture agent-a
workmux capture agent-a -n 50
workmux send agent-a "fix the tests"
workmux send agent-a "/merge"
workmux send agent-a -f followup.md
workmux send myproject:docs "update the API section"
workmux run agent-a -- pytest tests/
workmux run agent-a -b -- npm run build
Other commands
workmux path <name>
workmux dashboard
workmux config edit
workmux config reference
workmux init
Configuration
Two levels: global (~/.config/workmux/config.yaml) and project
(.workmux.yaml). Project overrides global.
Key options
agent: claude
merge_strategy: rebase
mode: window
panes:
- command: <agent>
focus: true
- split: horizontal
files:
copy:
- .env
symlink:
- node_modules
pre_create:
- git fetch origin --prune
post_create:
- "<global>"
- npm install
base_branch: develop
window_prefix: wm-
Use '<global>' in project config arrays to include global values.
For the full configuration reference with all options documented, run
workmux config reference.
Agent detection
Built-in agents (claude, gemini, codex, opencode, kiro-cli, vibe)
are auto-detected in pane commands and receive prompt injection automatically.
The <agent> placeholder resolves to the configured agent.
Common Workflows
Finishing work: direct merge
Use /merge to commit, rebase onto the base branch, and merge in one step. This
cleans up the worktree, tmux window, and branch.
Finishing work: PR-based
- Commit changes
git push -u origin HEAD
- Use
/open-pr to write a PR description and open in browser
- After PR is merged remotely, clean up with
workmux rm --gone
Delegating tasks
Use /worktree to spin off tasks into parallel worktree agents. The agent
writes a prompt file and runs workmux add -b -P <file>.
For full lifecycle orchestration (spawn, monitor, merge), use /coordinator.
Cross-project worktree creation
workmux add creates worktrees in the current git repo and adds the window to
the current tmux session. To create a worktree in a different project, run
workmux add inside that project's tmux session.
Discover project paths from existing sessions:
tmux list-sessions -F '#{session_name} #{session_path}'
Then create the worktree in the target session:
tmux new-window -t <session> -c <project-path> \
"workmux add <branch> -b -P <prompt-file>; exit"
tmux new-session -d -s <session> -c <project-path> && \
tmux new-window -t <session> -c <project-path> \
"workmux add <branch> -b -P <prompt-file>; exit"
The temporary window closes when workmux add finishes; the worktree window
that workmux creates stays in the session.
Do NOT research before dispatching. Use context you already have, but do not
explore or read code just to write the prompt. Worktree agents can read files
from other projects via absolute paths, so reference other projects by path and
let the agent explore on its own.
Related Skills
/merge: commit, rebase, and merge the current branch
/rebase: rebase with smart conflict resolution
/worktree: delegate tasks to parallel worktree agents
/coordinator: orchestrate multiple agents (spawn, monitor, merge)
/open-pr: write PR description and open in browser