This is the full developer documentation for workmux # Changelog > Release notes and version history for workmux November 10, 2026Latest ## v0.1.282 [Section titled “v0.1.282”](#v0-1-282) New * `{project}` now resolves to the repository name for bare repositories, such as `my-project/.bare` or `my-project.git`. See [project names and worktree paths](https://workmux.dev/guide/configuration#project-names-and-worktree-paths). ([#355](https://github.com/raine/workmux/issues/355)) Fixes * Fix `workmux remove` failing on detached worktrees. ([#354](https://github.com/raine/workmux/issues/354)) November 8, 2026 ## v0.1.281 [Section titled “v0.1.281”](#v0-1-281) New * Add experimental Zellij support for the agent sidebar. See the [Zellij guide](https://workmux.dev/guide/zellij). ([#331](https://github.com/raine/workmux/pull/331)) * The Zellij backend now works with Zellij 0.44.1 or later instead of requiring a source build. * Add GitHub Copilot CLI as a built-in agent. ([#314](https://github.com/raine/workmux/pull/314)) * Show Copilot agents as waiting when they ask for permission or ask a question. Requires Copilot CLI 1.0.18 or later; `workmux setup` offers to update existing hooks. ([#336](https://github.com/raine/workmux/pull/336)) Fixes * Fix sandboxes crashing on start for agents with no known config mount, such as `agy`, or with a custom `sandbox.agent_config_dir`. * Fix Zellij commands occasionally failing when a pane closes. November 7, 2026 ## v0.1.280 [Section titled “v0.1.280”](#v0-1-280) Fixes * Fix slow multiplexer queries delaying agent registration and status updates in other sessions. ([#352](https://github.com/raine/workmux/pull/352)) * Fix commands failing from a project root whose `.git` file points to a bare repository. ([#296](https://github.com/raine/workmux/pull/296)) November 6, 2026 ## v0.1.279 [Section titled “v0.1.279”](#v0-1-279) New * Add `--wait` to `workmux send` to wait for the agent to finish, and target agents by pane ID. `send` now refuses to type into an agent waiting on a dialog or to guess between several agents in one worktree. * Add `-b`/`--background` to `workmux open` to open worktrees without switching to them, like `workmux add`. ([#347](https://github.com/raine/workmux/issues/347)) Fixes * Fix the dashboard using high CPU while idle on Zellij. ([#348](https://github.com/raine/workmux/issues/348)) * Fix opening a worktree from another project in the dashboard doing nothing or resolving the wrong project. * Fix keys typed right after a remote agent’s window reconnects being lost. ([#350](https://github.com/raine/workmux/pull/350)) * Fix windows staying open with only the sidebar for up to two seconds after the last pane’s shell exits. ([#346](https://github.com/raine/workmux/pull/346)) October 31, 2026 ## v0.1.278 [Section titled “v0.1.278”](#v0-1-278) New * **New!** Run agents on remote Linux servers over SSH while keeping them in your local tmux windows, dashboard and sidebar. Agents keep working while your machine sleeps or disconnects; bring their work home with `workmux merge`. Experimental: see the [remote servers guide](https://workmux.dev/guide/remote/) for setup. Performance * Reduce tmux queries when registering agents and updating their status. ([#342](https://github.com/raine/workmux/issues/342)) Fixes * Fix sidebar Git diff stats disappearing or stopping updates on macOS. * Fix Codex status hooks reporting to the wrong pane by disabling its shared background server. Codex launches now require version 0.156 or newer. ([#330](https://github.com/raine/workmux/issues/330)) * Fix recent Codex versions failing to start or run commands in Docker images and Lima VMs, and skip hook-review prompts inside sandboxes. Recreate existing Lima VMs with `workmux sandbox prune` to update their Codex installation. * Fix OpenCode failing to start with a state-directory permission error in Docker and Podman sandboxes. October 23, 2026 ## v0.1.277 [Section titled “v0.1.277”](#v0-1-277) New * **New!** Scope the sidebar to selected sessions or project directories with `sidebar.views`. Each window shows the view matching its own agent; press `V` or run `workmux sidebar view on|off` to toggle views across all sidebars. See the [sidebar guide](https://workmux.dev/guide/sidebar/#named-views). * Fork Pi conversations into new worktrees with `workmux add --fork`. ([#337](https://github.com/raine/workmux/issues/337)) Improved * Show which project each agent belongs to in `workmux status --all`, plus its tmux session when the session name differs from the project. * Keep finished agents out of the sidebar’s stale section until you review them. * Clear an agent’s manual sleep when it starts new work. Fixes * Stop `--auto-name` from saving throwaway sessions to the agent’s history for the built-in Claude, Codex, Pi and OMP commands. * Fix `--auto-name` with Codex failing for ChatGPT accounts by switching the default model to `gpt-6-luna`. * Fix sidebars resizing each other in a loop and burning CPU when many windows are open. October 14, 2026 ## v0.1.276 [Section titled “v0.1.276”](#v0-1-276) Fixes * Fix sidebar sizing and preserve content pane proportions when opening or closing the sidebar on tmux 3.8. ([#325](https://github.com/raine/workmux/issues/325)) October 13, 2026 ## v0.1.275 [Section titled “v0.1.275”](#v0-1-275) Fixes * Fix missing latest user prompts for OpenCode V2 in the dashboard and sidebar, including follow-up prompts sent while the agent is working. October 12, 2026 ## v0.1.274 [Section titled “v0.1.274”](#v0-1-274) * Add status tracking for OpenCode V2’s terminal UI; run `workmux setup` to install the integration. ([#306](https://github.com/raine/workmux/pull/306)) * Set `dashboard.layout: side_by_side` to place the preview on the left and the table on the right, giving the preview the full dashboard content height. ([#323](https://github.com/raine/workmux/issues/323)) * Choose a Ctrl-letter key to leave dashboard input mode with `dashboard.input_exit_key`, allowing Escape to be sent to the agent instead. Escape remains the default exit key. ([#322](https://github.com/raine/workmux/issues/322)) October 11, 2026 ## v0.1.273 [Section titled “v0.1.273”](#v0-1-273) Fixes * Fix missing pull request details and check status in the dashboard for bare repository worktrees. ([#321](https://github.com/raine/workmux/issues/321)) October 9, 2026 ## v0.1.272 [Section titled “v0.1.272”](#v0-1-272) Improved * Reset sidebar scrolling to the top when focusing an agent or returning to its window. Performance * Reduce sidebar background CPU use by avoiding repeated Git calculations and project config lookups. * Reduce memory use for workmux commands and sidebar clients. Fixes * Fix agents inheriting another repository’s project config, and automatically pick up newly created or replaced project configs in the sidebar. October 4, 2026 ## v0.1.271 [Section titled “v0.1.271”](#v0-1-271) * Set `sidebar.enter_action: select` to show an agent’s window with Enter while keeping sidebar focus for continued keyboard navigation; press `o` to focus the agent pane. ([#315](https://github.com/raine/workmux/issues/315)) October 4, 2026 ## v0.1.270 [Section titled “v0.1.270”](#v0-1-270) New * Show each agent’s latest user prompt with the opt-in dashboard `prompt` column or sidebar `{prompt}` token; run `workmux setup` to update prompt capture for OpenCode, pi, and oh-my-pi. ([#316](https://github.com/raine/workmux/issues/316), [#317](https://github.com/raine/workmux/pull/317)) Fixes * Fix working agents remaining marked as interrupted or stale after their terminal output resumes. September 30, 2026 ## v0.1.269 [Section titled “v0.1.269”](#v0-1-269) New * Show pull request titles and issues they close in opt-in `pr_title` and `pr_issues` columns in both dashboard tables. ([#308](https://github.com/raine/workmux/issues/308)) * Set `sidebar.git_status: false` to stop sidebar Git, pull request, and check collection, reducing background CPU use in large repositories without affecting the dashboard. ([#312](https://github.com/raine/workmux/issues/312)) * Set `confirm_unmerged_removal: false` to remove unmerged branches without an extra confirmation while continuing to protect uncommitted changes. ([#310](https://github.com/raine/workmux/issues/310)) Fixes * Fix Antigravity status hooks blocking tool calls; run `workmux setup` to update an existing installation. ([#309](https://github.com/raine/workmux/issues/309)) September 26, 2026 ## v0.1.268 [Section titled “v0.1.268”](#v0-1-268) Fixes * Prevent unrelated Claude background sessions from overwriting an interactive pane’s status and session identity, while preserving status tracking for attached `/bg` continuations. ([#300](https://github.com/raine/workmux/issues/300)) September 25, 2026 ## v0.1.267 [Section titled “v0.1.267”](#v0-1-267) New * Configure when agents become stale in the dashboard and sidebar with `stale_after`, using seconds or durations such as `90m` or `5h`. ([#298](https://github.com/raine/workmux/issues/298)) Improved * Keep the dashboard responsive while removing worktrees, with a deleting indicator and clear feedback if removal fails or continues in the background. September 22, 2026 ## v0.1.266 [Section titled “v0.1.266”](#v0-1-266) Improved * Allow sidebar widths as narrow as one column for compact icon-only layouts, preserving widths below 10 columns when configured or resized. ([#297](https://github.com/raine/workmux/issues/297)) September 22, 2026 ## v0.1.265 [Section titled “v0.1.265”](#v0-1-265) New * New! Group the sidebar by project or tmux session and fold away stale agents, off by default. See the [sidebar guide](https://workmux.dev/guide/sidebar/#grouping). * Sort sidebar agents by attention needed with `sidebar.sort: priority`, placing waiting and done agents first. ([#285](https://github.com/raine/workmux/issues/285), [#289](https://github.com/raine/workmux/pull/289)) Improved * Show the pull request number beside its check status in the sidebar’s default templates. ([#289](https://github.com/raine/workmux/pull/289)) Fixes * Fix terminal resizing making tmux temporarily unresponsive when many windows have sidebars. September 21, 2026 ## v0.1.264 [Section titled “v0.1.264”](#v0-1-264) New * Add an opt-in `window` column to the dashboard’s agent table for showing tmux window indexes. ([#227](https://github.com/raine/workmux/pull/227)) * Install shell completions automatically with Homebrew. ([#284](https://github.com/raine/workmux/pull/284)) Improved * Show more of long worktree and branch names when the dashboard has room. ([#281](https://github.com/raine/workmux/pull/281)) * Keep the dashboard open when `Esc` is pressed in its main views; use `q` or `Ctrl+C` to quit. ([#104](https://github.com/raine/workmux/pull/104)) * Enable the fast `node_modules` cleanup on worktree removal in monorepos where the lockfile lives in a subdirectory, such as `dashboard/pnpm-lock.yaml`, instead of only at the project root. * Keep the fast `node_modules` cleanup when a project defines its own `pre_remove` commands by listing `""` among them. Previously any `pre_remove` entry replaced the cleanup entirely. See the [lifecycle hooks guide](https://workmux.dev/guide/configuration#lifecycle-hooks) Fixes * Fix the sidebar failing to start on macOS when long temporary or custom tmux socket paths exceed Unix socket limits. ([#293](https://github.com/raine/workmux/issues/293)) * Keep Pi panes marked as working throughout automatic compaction when delegated activity tracking is enabled, preserving the elapsed timer until the continuation finishes. September 16, 2026 ## v0.1.263 [Section titled “v0.1.263”](#v0-1-263) New * Add `default_session` to name a session that clients return to when a workmux session closes in session mode, instead of whichever session each client viewed previously. ([#278](https://github.com/raine/workmux/pull/278)) Fixes * Fix dashboard removal and sweep actions targeting the wrong worktree when managing multiple projects. ([#272](https://github.com/raine/workmux/pull/272)) * Prevent Pi and Oh My Pi status integrations from overwriting each other, and stop Oh My Pi from briefly showing waiting while tools start. * Fix `post_create` hooks receiving an incorrect `WM_PROJECT_ROOT` when using nested or alternate configs outside the repository. ([#283](https://github.com/raine/workmux/issues/283)) September 12, 2026 ## v0.1.262 [Section titled “v0.1.262”](#v0-1-262) Fixes * Fix empty dashboard review diffs for newly checked-out GitHub PRs and GitLab merge requests by comparing against their target branch. ([#276](https://github.com/raine/workmux/issues/276)) September 12, 2026 ## v0.1.261 [Section titled “v0.1.261”](#v0-1-261) Fixes * Fix `remove` and `close` detaching clients instead of switching to another session when run from tmux popups in session mode. ([#273](https://github.com/raine/workmux/issues/273)) * Fix worktree creation failing in repositories with symlinked or hard-linked Git hooks outside container sandboxes. ([#274](https://github.com/raine/workmux/issues/274)) * Fix `workmux set-window-status clear` leaving stale agent status in the sidebar. September 11, 2026 ## v0.1.260 [Section titled “v0.1.260”](#v0-1-260) New * Create worktrees without a terminal multiplexer using `workmux add --headless`, with file operations and setup hooks included. Add `--json` for automation, and attach later with `workmux open`. * Hide or reorder columns in the dashboard’s Worktrees tab with `dashboard.worktree_columns`. ([#270](https://github.com/raine/workmux/issues/270)) Improved * Keep Pi agents marked as working while delegated children are active, even after the parent finishes its turn. See for more. September 8, 2026 ## v0.1.259 [Section titled “v0.1.259”](#v0-1-259) Improved * Show how many agents remain below the visible area in the sidebar’s tile view. Fixes * Fix worktree cleanup giving up when background processes keep writing files. You may find files left behind by previous removals in hidden `.workmux_trash_*` directories alongside your worktrees. September 7, 2026 ## v0.1.258 [Section titled “v0.1.258”](#v0-1-258) Fixes * Fix `project:handle` targets incorrectly reporting “No agent found” in `send`, `capture`, `status`, `wait`, and `run` with default or custom worktree directory layouts. ([#269](https://github.com/raine/workmux/issues/269)) September 7, 2026 ## v0.1.257 [Section titled “v0.1.257”](#v0-1-257) * Check out GitLab merge requests into worktrees with `workmux add --pr`, including self-hosted GitLab via MR URLs or `--forge gitlab`. Requires authenticated `glab` 1.37.0 or newer. ([#267](https://github.com/raine/workmux/issues/267)) September 6, 2026 ## v0.1.256 [Section titled “v0.1.256”](#v0-1-256) New * Resume an agent’s previous session when recreating a worktree at the same path with `workmux add --continue`, optionally supplying a follow-up prompt. * Select an agent with `-a` or `--agent` in the worktree skill, and preserve attachment paths in delegated prompts. Improved * Report missing executables selected with `--agent` before creating branches or worktrees for local launches. * Reuse agents’ existing conversations for follow-up work with the coordinator skill, including after worktrees are merged or removed. Fixes * Fix `workmux send` failing to deliver multiline messages and single-line Codex prompts on Kitty. ([#268](https://github.com/raine/workmux/issues/268)) September 5, 2026 ## v0.1.255 [Section titled “v0.1.255”](#v0-1-255) Improved * Keep agent sessions available to resurrect after multiplexer restarts and workmux upgrades without accumulating duplicate history. Performance * Improve sidebar performance without sacrificing responsiveness: * Cut background Git status CPU by 74% in benchmarks. * Cut GitHub status refresh CPU by 60% in benchmarks. * Cut tmux observation CPU by 26% in a large-session benchmark. Fixes * Show accurate Git status for agents in nested directories, shared repositories, and linked worktrees while ignoring directories outside Git repositories. September 3, 2026 ## v0.1.254 [Section titled “v0.1.254”](#v0-1-254) Performance * Speed up sandbox startup for repositories with large local Git configurations. ([#266](https://github.com/raine/workmux/pull/266)) Fixes * Fix `workmux send` leaving prompts unsubmitted in active Codex panes. ([#261](https://github.com/raine/workmux/issues/261)) September 2, 2026 ## v0.1.253 [Section titled “v0.1.253”](#v0-1-253) New * Configure the shell and arguments used for lifecycle hooks with `hook_shell`, including machine-specific shell paths and flags. Fixes * Fix Pi panes being marked done during interrupted compaction or retry turns; they remain working until a successful continuation finishes. September 1, 2026 ## v0.1.252 [Section titled “v0.1.252”](#v0-1-252) Fixes * Kitty worktree creation and status tracking tolerate unavailable foreground process metadata. ([#265](https://github.com/raine/workmux/issues/265)) September 1, 2026 ## v0.1.251 [Section titled “v0.1.251”](#v0-1-251) Improved * Harden multiplexer command execution and worktree cleanup against untrusted shell text, repository-controlled Git hooks, and filesystem target replacement. * Clear completed or waiting status immediately when the agent pane is already focused. Fixes * Generate concise branch names for question-style `--auto-name` prompts, and reject invalid model responses before creating a worktree. ([#264](https://github.com/raine/workmux/issues/264)) August 30, 2026 ## v0.1.250 [Section titled “v0.1.250”](#v0-1-250) Fixes * Keep pane-less agent status updates tied to the correct tmux pane, preventing unrelated shells and editors from being marked as active. ([#252](https://github.com/raine/workmux/issues/252)) August 30, 2026 ## v0.1.249 [Section titled “v0.1.249”](#v0-1-249) Improved * Register agent panes on startup so they appear immediately in the sidebar and dashboard. (Agent harness support varies.) Performance * Improve sidebar performance by reducing startup latency, idle wakeups, tmux polling, and rendering overhead. August 26, 2026 ## v0.1.248 [Section titled “v0.1.248”](#v0-1-248) * Set `dashboard.close_on_jump: false` to keep the dashboard open when jumping between agents and worktrees. ([#226](https://github.com/raine/workmux/pull/226)) August 25, 2026 ## v0.1.247 [Section titled “v0.1.247”](#v0-1-247) New * Use `workmux status --all` and `workmux list --all` to inspect tracked agents and worktrees across every repository in the current multiplexer. * Configure the dashboard’s initial sort order with `dashboard.sort_mode`. ([#249](https://github.com/raine/workmux/issues/249), [#250](https://github.com/raine/workmux/pull/250)) * Use idempotent `workmux sidebar on` and `workmux sidebar off` commands for global and session-scoped sidebar lifecycle control. * Set sidebar width or height when enabling it, using terminal units or percentages. Improved * Raise the deny-mode network proxy connection limit, make it configurable, and return an HTTP 503 response when the proxy reaches capacity. Fixes * Fix sidebar colors failing to update after configuration changes and stale selections lingering after switching agents. * Restore `workmux add` for Git LFS repositories while keeping shared Git configuration and hooks read-only in container sandboxes. ([#256](https://github.com/raine/workmux/issues/256), [#258](https://github.com/raine/workmux/issues/258)) August 24, 2026 ## v0.1.246 [Section titled “v0.1.246”](#v0-1-246) Fixes * Fix container startup failing with `network.policy: deny` when the host provides IPv6 nameservers, which happens with Podman. ([#254](https://github.com/raine/workmux/issues/254)) August 23, 2026 ## v0.1.245 [Section titled “v0.1.245”](#v0-1-245) Fixes * Fix agents losing write access to the worktree under rootless Podman with `network.policy: deny`. ([#253](https://github.com/raine/workmux/issues/253)) * Fix stale agent status, title, and activity age lingering in the sidebar when tmux reuses a pane ID for a different process. August 22, 2026 ## v0.1.244 [Section titled “v0.1.244”](#v0-1-244) New * `window_prefix` accepts the `{project}` placeholder, which expands to the main worktree’s directory name. A single global config can namespace tmux window and session names per repository. ([#230](https://github.com/raine/workmux/issues/230)) Fixes * Fix a regression from the Git security hardening in v0.1.241 that caused protected Git operations to ignore standard global and system configuration. Global ignore rules apply consistently to merge safety checks. August 21, 2026 ## v0.1.243 [Section titled “v0.1.243”](#v0-1-243) New * Add Grok (SpaceXAI) as a supported agent for status tracking, interactive prompt injection, and skills. `workmux setup` installs status hooks and bundled skills under `~/.grok/` or `$GROK_HOME`. ([#207](https://github.com/raine/workmux/pull/207)) * `workmux add --fork` works with Codex. Bare `--fork` picks the Codex session you are in, or the most recent one recorded for the current worktree, and `--fork=` takes a session ID or an unambiguous prefix. ([#229](https://github.com/raine/workmux/issues/229)) * The dashboard agents table can be reordered and trimmed with the `dashboard.agent_columns` option. ([#225](https://github.com/raine/workmux/pull/225)) * `workmux add --pr` accepts pull request URLs from GitHub Enterprise installations, not only github.com. Fixes * Passing `-a`/`--agent` no longer replaces explicitly configured pane commands such as `nvim`, which also stops a second agent from being spawned. The agent goes into a plain shell pane, and layouts where every pane has a command are left as they are. ([#243](https://github.com/raine/workmux/issues/243)) * Fix the prompt being injected twice into panes whose command is written out literally as the agent’s own command. ([#242](https://github.com/raine/workmux/pull/242)) August 20, 2026 ## v0.1.242 [Section titled “v0.1.242”](#v0-1-242) Improved * `workmux setup` installs the Copilot CLI status hook once at the user level (`~/.copilot/hooks/workmux-status.json`), so pane status tracking works in every repository without per-repository setup. Requires Copilot CLI 0.0.422 or later, and unrelated hooks in that file are preserved. If a repository still has a `.github/hooks/workmux-status` directory, remove it to avoid running the hook twice. ([#247](https://github.com/raine/workmux/issues/247)) August 20, 2026 ## v0.1.241 [Section titled “v0.1.241”](#v0-1-241) Improved * Harden Git handling across sandbox backends. Container guests can no longer modify shared Git configuration or hooks, while normal commits and branch operations continue to work. Workmux host Git operations also ignore repository-controlled hooks and executable Git settings. * Freeze the effective configuration when a sandbox session starts, preventing guest changes to `.workmux.yaml` from altering host-side spawn, status, merge, or close operations during that session. August 19, 2026 ## v0.1.240 [Section titled “v0.1.240”](#v0-1-240) Fixes * Apply configured pane `percentage` values in the Kitty backend, so layouts split the same way they do in tmux. Percentage sizing requires Kitty’s `splits` layout; absolute `size` values remain unsupported there. ([#239](https://github.com/raine/workmux/issues/239)) * Treat custom tmux `status_icons` as plain text when clearing a status on pane focus, so icons containing tmux syntax work as written. August 18, 2026 ## v0.1.239 [Section titled “v0.1.239”](#v0-1-239) New * Set `sidebar.dim_stale: false` to keep stale sidebar rows in their normal status colors instead of dimming them. ([#234](https://github.com/raine/workmux/pull/234)) Improved * Detect outdated Pi and Oh My Pi status extensions during `workmux setup` and offer to replace them, preventing excessive status update processes from older extensions. Fixes * Keep OpenCode panes marked as working while any parent or subagent session is active, and avoid false completion indicators from untracked or deleted sessions. ([#235](https://github.com/raine/workmux/pull/235)) August 9, 2026 ## v0.1.237 [Section titled “v0.1.237”](#v0-1-237) Breaking * Make `workmux status --json` return a versioned observation object instead of an array, with scope and state-file diagnostics. Unresolved explicit targets return partial results with a nonzero exit status. ([#210](https://github.com/raine/workmux/issues/210)) Fixes * Treat `` as empty when the corresponding global hook or file-operation list is unset, allowing shared project configs to work without matching global values. ([#224](https://github.com/raine/workmux/issues/224)) August 8, 2026 ## v0.1.236 [Section titled “v0.1.236”](#v0-1-236) New * Show working, waiting, and done status icons in Zellij tab titles. ([#220](https://github.com/raine/workmux/pull/220)) Improved * Track Codex subagents through new dedicated stop hooks, keeping the pane marked as working until the root turn finishes. * Place new tmux windows in the session whose pane paths best match the current directory when pane context is unavailable, and return an actionable error when multiple sessions match equally well. Fixes * Keep agent status updates tied to the correct pane when background hooks run without `TMUX_PANE` (seems to happens with Claude Code occasionally). August 7, 2026 ## v0.1.235 [Section titled “v0.1.235”](#v0-1-235) Fixes * Close and remove the correct tmux windows even after they are renamed, without affecting unrelated windows that reuse the original name. ([#212](https://github.com/raine/workmux/issues/212)) * Redraw the full sidebar cleanly after terminal resizes, preventing fragments of the previous layout from remaining on screen. * Prevent sidebar auto-exit from killing the active pane in another window. ([#219](https://github.com/raine/workmux/issues/219)) August 4, 2026 ## v0.1.234 [Section titled “v0.1.234”](#v0-1-234) New * Sort sidebar rows by recent activity or tmux window order with `sidebar.sort`, and show native tmux window numbers in custom layouts with `{window_index}`. ([#214](https://github.com/raine/workmux/issues/214)) ([#215](https://github.com/raine/workmux/pull/215)) Improved * Let bundled agent skills dispatch cross-project worktrees directly into the requested tmux session without an intermediate window. Fixes * Prevent filesystem reads from triggering continuous sidebar refreshes on Linux, eliminating config reload loops and unnecessary CPU use. ([#217](https://github.com/raine/workmux/issues/217)) ([#218](https://github.com/raine/workmux/pull/218)) * Keep agent views available and clean up stale state when a tmux pane disappears. ([#213](https://github.com/raine/workmux/issues/213)) * Preserve the exact spelling and capitalization of parent tmux session names passed to `workmux add` or `workmux open`. * Accept branch names from automatic naming commands that exit without reading the prompt from stdin. August 2, 2026 ## v0.1.233 [Section titled “v0.1.233”](#v0-1-233) Improved * Include agent type, working directory, tmux session and window, and last-update time in `workmux status --json`. ([#210](https://github.com/raine/workmux/issues/210)) Fixes * Preserve valid auto-generated Git branch names, including slash-separated names such as `fix/issue-123`. ([#206](https://github.com/raine/workmux/issues/206)) * Keep agents visible in status views when a tmux pane query fails temporarily. ([#209](https://github.com/raine/workmux/issues/209)) July 31, 2026 ## v0.1.232 [Section titled “v0.1.232”](#v0-1-232) New * Use the mouse throughout the dashboard to switch tabs, select or open rows, run actions, scroll previews and diffs, and navigate files. * Show GitHub checks for remote branches without pull requests in the sidebar and dashboard, including failure indicators for main branches. Improved * Make dashboard selections and elapsed times easier to scan with clearer highlighting and subdued long-running timers. Performance * Keep sidebar GitHub status refreshes efficient across linked worktrees, reducing redundant requests for the same repository. Fixes * Keep the dashboard’s current-session filter tied to the active tmux session when opened in a popup. July 28, 2026 ## v0.1.231 [Section titled “v0.1.231”](#v0-1-231) Improved * Clear acknowledged waiting or completed statuses from the sidebar immediately when you focus an agent pane. July 28, 2026 ## v0.1.230 [Section titled “v0.1.230”](#v0-1-230) Fixes * Prevent `workmux merge` from deleting the main worktree when its branch is selected as the merge source. ([#204](https://github.com/raine/workmux/issues/204)) July 26, 2026 ## v0.1.229 [Section titled “v0.1.229”](#v0-1-229) * Run Docker or Podman sandboxes with an alternative OCI runtime such as Kata Containers for hardware-backed VM isolation by setting `sandbox.container.oci_runtime` in the global config. ([#196](https://github.com/raine/workmux/issues/196)) ([#198](https://github.com/raine/workmux/pull/198)) July 26, 2026 ## v0.1.228 [Section titled “v0.1.228”](#v0-1-228) New * Use Antigravity CLI (`agy`) with automatic detection, prompt injection, branch name generation, and status tracking setup. ([#168](https://github.com/raine/workmux/issues/168)) ([#183](https://github.com/raine/workmux/pull/183)) * Set `base_branch: auto` to create new worktrees from each repository’s effective main branch. ([#199](https://github.com/raine/workmux/issues/199)) Improved * See Codex permission prompts as waiting in the sidebar and dashboard. ([#197](https://github.com/raine/workmux/issues/197)) July 26, 2026 ## v0.1.227 [Section titled “v0.1.227”](#v0-1-227) Fixes * Prevent stale sidebar pane cleanup from displaying harmless tmux errors. July 25, 2026 ## v0.1.226 [Section titled “v0.1.226”](#v0-1-226) Fixes * Show linked worktree ages in `workmux list` when using Linux musl builds. July 23, 2026 ## v0.1.225 [Section titled “v0.1.225”](#v0-1-225) New * Configure Zellij worktrees with stacked panes and custom pane names. ([#190](https://github.com/raine/workmux/pull/190)) Performance * Keep sidebar idle CPU usage low when no pull request data is available. July 18, 2026 ## v0.1.224 [Section titled “v0.1.224”](#v0-1-224) New * Check out a pull request by passing its full GitHub URL to `workmux add --pr`, in addition to using its number. Fixes * Keep the configured top sidebar height accurate when tmux pane titles are shown. July 17, 2026 ## v0.1.223 [Section titled “v0.1.223”](#v0-1-223) Improved * Update the sidebar’s active agent marker more quickly when navigation hotkeys switch tmux windows. * Let the bundled merge and rebase skills safely include or preserve staged, unstaged, and untracked changes. * Merge completed agents sooner in coordinated workflows instead of waiting for every agent to finish. July 15, 2026 ## v0.1.222 [Section titled “v0.1.222”](#v0-1-222) Improved * Keep dashboard refreshes responsive after multiplexer restarts while preserving agent state for `workmux resurrect`. July 13, 2026 ## v0.1.221 [Section titled “v0.1.221”](#v0-1-221) Improved * Ask for confirmation before quitting the sidebar, preventing accidental quit keypresses from closing all sidebar panes. Fixes * Keep the dashboard display intact when pre-remove hooks print output during worktree removal or bulk sweeps. July 12, 2026 ## v0.1.220 [Section titled “v0.1.220”](#v0-1-220) * Preview the resolved worktree path, branch, base, multiplexer target, file operations, and post-create hooks with `workmux add --dry-run`, without creating or modifying anything. July 12, 2026 ## v0.1.219 [Section titled “v0.1.219”](#v0-1-219) Improved * The bundled workmux skill can guide coding agents to check out GitHub pull requests into new worktrees with `workmux add --pr`. July 2, 2026 ## v0.1.218 [Section titled “v0.1.218”](#v0-1-218) New * Add a sidebar filter for switching between all sessions and the current tmux session, with jump navigation that works across sessions. ([#124](https://github.com/raine/workmux/pull/124)) * Add `window_placement` to choose whether new tmux windows open next to the current window or at the right edge of the session. Fixes * Keep PR numbers and states visible in `workmux list --pr` when GitHub check rollup queries fail. * Make concurrent agent state writes safer, preventing overlapping updates from clobbering each other. ([#188](https://github.com/raine/workmux/pull/188)) * Keep Nix package builds reliable in sandboxed build environments. June 29, 2026 ## v0.1.217 [Section titled “v0.1.217”](#v0-1-217) Fixes * Keep the sidebar spinner moving while panes are active. ([#180](https://github.com/raine/workmux/issues/180)) * Respect configured sidebar width and height instead of replacing them with synced resize values. ([#172](https://github.com/raine/workmux/pull/172)) * Install the Pi agent sandbox from the current package name. ([#179](https://github.com/raine/workmux/pull/179)) * Recover automatically when a tmux resize leaves the sidebar excessively wide. June 28, 2026 ## v0.1.216 [Section titled “v0.1.216”](#v0-1-216) Fixes * Fix Codex status tracking when hooks run without tmux environment details, so Codex agents appear in `workmux list` and the sidebar. ([#187](https://github.com/raine/workmux/issues/187)) * Keep Codex sidebar status accurate for subagents, so panes stay working while parent work continues and clear when the root turn finishes. ([#170](https://github.com/raine/workmux/issues/170)) June 26, 2026 ## v0.1.215 [Section titled “v0.1.215”](#v0-1-215) Improved * Place new tmux windows from `workmux add` immediately beside the calling window, keeping new worktrees easy to find. June 26, 2026 ## v0.1.214 [Section titled “v0.1.214”](#v0-1-214) New * Add `workmux rebase` to rebase a worktree onto its saved base branch, with automatic fallback to the configured main branch. * Add `workmux sidebar --position ` to choose sidebar placement when enabling the sidebar. * Add structured [named agent profiles](https://workmux.dev/guide/agents#named-agents) with separate `type`, `command`, `args`, and `env` fields, including `from_env` values and `` pane placeholders. Improved * Place new tmux windows beside the current window for more predictable navigation. Fixes * Keep named agent profiles stable across repeated launches, so profile commands and arguments are not mutated between runs. * Preserve the current tmux focus when merging a worktree from an inactive window. June 12, 2026 ## v0.1.213 [Section titled “v0.1.213”](#v0-1-213) New * Add first-party Oh My Pi (`omp`) support for prompt injection, status setup with waiting detection, skills, and sandbox credential mounts. ([#177](https://github.com/raine/workmux/pull/177)) Improved * Refresh the sidebar immediately after removing a worktree. Fixes * Fix dashboard paste handling so pasted input is processed reliably. ([#178](https://github.com/raine/workmux/issues/178)) June 6, 2026 ## v0.1.212 [Section titled “v0.1.212”](#v0-1-212) New * Add an uninstall script that removes workmux hooks, bundled skills, cache, and state data while preserving unrelated agent configuration. * Add `workmux reap-agents` to find stale tracked agents and optionally stop their agent process without tearing down the pane. Fixes * Fix `workmux resurrect` so worktrees that used a non-default agent resume with the same agent after a crash. ([#175](https://github.com/raine/workmux/issues/175)) * Fix `workmux remove` leaving stale tmux windows behind in some cleanup cases. May 22, 2026 ## v0.1.211 [Section titled “v0.1.211”](#v0-1-211) Fixes * Respect each repository’s configured base branch when adding worktrees from the dashboard. * Keep dashboard worktree creation and PR checkout actions tied to the selected repository instead of the shell’s current repository. May 22, 2026 ## v0.1.210 [Section titled “v0.1.210”](#v0-1-210) New * Add custom tmux target names for `workmux add` and `workmux open`, so the worktree directory can stay separate from the window or session name. ([#139](https://github.com/raine/workmux/issues/139)) * Allow window-mode worktrees to open inside a chosen parent tmux session. Fixes * Keep sidebar PR status tied to the correct branch, avoiding stale PR details on base branches. May 19, 2026 ## v0.1.209 [Section titled “v0.1.209”](#v0-1-209) New * Allow `workmux merge` to keep the worktree, window, and branch by default with `merge_keep: true`. * Add `workmux merge --cleanup` to clean up for a single merge when keep-by-default behavior is enabled. Improved * Document how worktree dispatch should handle tasks that target another project. May 15, 2026 ## v0.1.208 [Section titled “v0.1.208”](#v0-1-208) New * Add a horizontal top bar option for the sidebar, with configurable height and chip width * Allow showing PR status and checks in sidebar Improved * Make sidebar template errors visible in sidebar * Improve sidebar loading, sync, spacing, and horizontal layout behavior May 13, 2026 ## v0.1.207 [Section titled “v0.1.207”](#v0-1-207) Fixes * Fix `workmux merge` falling back incorrectly when a saved base branch only exists as a remote ref * Update the Pi sandbox image to install the current Pi agent package ([#165](https://github.com/raine/workmux/pull/165)) May 12, 2026 ## v0.1.206 [Section titled “v0.1.206”](#v0-1-206) New * Add Pi agent support for container and Lima sandboxes Fixes * Fix `workmux add` hanging when launched with an open stdin pipe that has no input May 12, 2026 ## v0.1.205 [Section titled “v0.1.205”](#v0-1-205) Fixes * Update Codex setup to enable hooks with the current `hooks` feature flag. ([#164](https://github.com/raine/workmux/issues/164)) May 9, 2026 ## v0.1.204 [Section titled “v0.1.204”](#v0-1-204) Improved * Allow `workmux add --pr` to reuse an existing local PR branch when it does not already have a worktree. ([#163](https://github.com/raine/workmux/issues/163)) May 8, 2026 ## v0.1.203 [Section titled “v0.1.203”](#v0-1-203) Improved * Let stale worktree directories be removed even when their Git metadata is missing, while still protecting branches unless `--keep-branch` is used. Fixes * Stop treating ordinary single-worktree prompts as MiniJinja templates May 5, 2026 ## v0.1.202 [Section titled “v0.1.202”](#v0-1-202) Fixes * Respect `CLAUDE_CONFIG_DIR` when installing Claude Code hooks, so custom Claude config locations are honored. May 5, 2026 ## v0.1.201 [Section titled “v0.1.201”](#v0-1-201) Fixes * Keep sidebar layouts in sync immediately after terminal resizes, including inactive tmux windows. * Fix prompt delivery for custom named agents that specify an agent type. May 4, 2026 ## v0.1.200 [Section titled “v0.1.200”](#v0-1-200) New * Allow `workmux close` to work from inside sandboxed worktrees by forwarding the request to the host. ([#158](https://github.com/raine/workmux/issues/158)) Fixes * Use the host workmux configuration for sandbox-launched host commands, avoiding accidental reuse of sandbox guest settings. May 4, 2026 ## v0.1.199 [Section titled “v0.1.199”](#v0-1-199) Fixes * Keep sidebar widths synchronized across tmux windows after manual resizing and terminal resize events. May 2, 2026 ## v0.1.198 [Section titled “v0.1.198”](#v0-1-198) * Allow `workmux sidebar --session` to hide or restore the sidebar for the current tmux session while global sidebar mode stays active. May 2, 2026 ## v0.1.197 [Section titled “v0.1.197”](#v0-1-197) Fixes * Respect `CLAUDE_CONFIG_DIR` when installing skills, so custom Claude config locations are honored. ([#157](https://github.com/raine/workmux/issues/157)) May 1, 2026 ## v0.1.196 [Section titled “v0.1.196”](#v0-1-196) Fixes * Fix Codex status tracking so panes stay marked as working while nested subagents are still running ([#154](https://github.com/raine/workmux/issues/154)) May 1, 2026 ## v0.1.195 [Section titled “v0.1.195”](#v0-1-195) Fixes * Keep compact sidebar status icons aligned even when icons have different widths May 1, 2026 ## v0.1.194 [Section titled “v0.1.194”](#v0-1-194) * Add `WORKMUX_DISABLE_SET_WINDOW_STATUS=1` to let nested agents skip status hook updates when launched from inside another agent pane. See the [status tracking guide](https://workmux.dev/guide/status-tracking) April 30, 2026 ## v0.1.191 [Section titled “v0.1.191”](#v0-1-191) New * Allow sandbox deny-mode domains to opt in to trusted private network destinations, such as VPN-hosted package mirrors, while keeping loopback and link-local addresses blocked Fixes * Keep sidebar tile rows stable when template fields are empty, so optional details no longer collapse and shift tile heights unexpectedly April 29, 2026 ## v0.1.190 [Section titled “v0.1.190”](#v0-1-190) New * Add sidebar template customization, letting you choose which labels, git stats, timers, and status details appear in compact and tile layouts. See the [sidebar customization guide](https://workmux.dev/guide/sidebar/customization) * Add customizable per-agent sidebar icons and colors, with built-in defaults for Claude, Codex, OpenCode, Gemini, Pi, Kiro, Vibe, and Copilot * Support tmux-style colors and attributes inside sidebar templates Improved * Improve sidebar rendering for git stats, elapsed time, row highlighting, and synchronized width across windows April 27, 2026 ## v0.1.189 [Section titled “v0.1.189”](#v0-1-189) Fixes * Fix pi agents lingering in the dashboard after exit ([#143](https://github.com/raine/workmux/issues/143)) April 26, 2026 ## v0.1.188 [Section titled “v0.1.188”](#v0-1-188) * Support `{project}` placeholder and `~` (tilde) expansion in `worktree_dir`, letting you use config like `worktree_dir = "~/worktrees/{project}"` ([#148](https://github.com/raine/workmux/issues/148)) April 25, 2026 ## v0.1.187 [Section titled “v0.1.187”](#v0-1-187) * Add `--config ` flag to `workmux add` and `workmux open` to use an alternate config file for a single invocation April 25, 2026 ## v0.1.186 [Section titled “v0.1.186”](#v0-1-186) New * Show a progress overlay when sweeping multiple worktrees in the dashboard, instead of freezing silently for several seconds * Install via `cargo binstall workmux` is now supported ([#137](https://github.com/raine/workmux/pull/137)) Improved * Truncate long worktree names in the dashboard so they no longer overflow the panel Fixes * Fix panics caused by Unicode characters in worktree names being truncated at non-character boundaries April 22, 2026 ## v0.1.185 [Section titled “v0.1.185”](#v0-1-185) Breaking * Restrict `excluded_files` to global config only, preventing malicious projects from disabling file masking via their own `.workmux.yaml` New * Add `--mode ` flag to `workmux add` and `workmux open` for per-command multiplexer mode overrides. Use `--mode window` to temporarily reopen a session-mode worktree as a window, or `--mode session` to create a one-off session without changing config. The existing `--session` flag is now shorthand for `--mode session` ([#139](https://github.com/raine/workmux/issues/139)) * Add `sandbox.container.excluded_files` config to hide sensitive worktree files from sandboxed containers by shadowing them with `/dev/null` (e.g. `.env`, `.env.local`). Configurable only in your global config for security ([#134](https://github.com/raine/workmux/pull/134)) Improved * Skip `excluded_files` gracefully with a clear warning on runtimes that do not support file-level bind mounts (Apple Container) Fixes * Fix sandbox relative gitdir path resolution and improve warning messages for directory entries April 17, 2026 ## v0.1.184 [Section titled “v0.1.184”](#v0-1-184) * Add `workmux rename [old-name] ` command to rename a worktree, its tmux window or session, agent state, and sandbox container marker. Pass `--branch` to also rename the underlying git branch ([#138](https://github.com/raine/workmux/issues/138)) * Add status tracking support for Gemini CLI, so Gemini agents now report working, waiting, and done states in the dashboard like Claude Code, Codex, and OpenCode. `workmux setup` auto-detects Gemini and installs the required hooks April 15, 2026 ## v0.1.183 [Section titled “v0.1.183”](#v0-1-183) * Add `container.devices` config to expose host device nodes (e.g. `/dev/kvm`, `/dev/ttyUSB0`) to sandboxed containers * Add `container.group_add` config to add supplementary groups (e.g. `dialout`, `video`) to the sandboxed process April 13, 2026 ## v0.1.182 [Section titled “v0.1.182”](#v0-1-182) Fixes * Fix OpenCode status tracking plugin distribution by moving shipped plugin files into `resources/opencode/` and updating `workmux setup` and manual install instructions to install both `package.json` and the plugin file to OpenCode’s global config directory * Fix duplicate OpenCode busy and idle status events causing stale window status transitions * Fix dashboard agent title prefixes April 11, 2026 ## v0.1.181 [Section titled “v0.1.181”](#v0-1-181) * Add command palette to the dashboard, accessible via `:`. Provides a fuzzy-searchable list of available actions for the current context with their key hints April 9, 2026 ## v0.1.180 [Section titled “v0.1.180”](#v0-1-180) * Add custom theme color overrides in config. Define custom colors under `theme.custom` to override any built-in theme’s palette, using hex colors, named colors, or terminal color indices ([#128](https://github.com/raine/workmux/issues/128)) * Render tmux style codes in status icons. Icons configured with tmux styles like `#[fg=#da8548]●` now display with proper colors instead of raw style strings ([#130](https://github.com/raine/workmux/issues/130)) * Add `--tab` flag to dashboard command to open directly on a specific tab (e.g. `workmux dashboard --tab agents`) ([#127](https://github.com/raine/workmux/issues/127)) April 9, 2026 ## v0.1.179 [Section titled “v0.1.179”](#v0-1-179) Breaking * Respect the XDG Base Directory Specification for config, cache, and state paths. Custom `XDG_CONFIG_HOME`, `XDG_CACHE_HOME`, and `XDG_STATE_HOME` values are now honored, with automatic fallback to defaults. Existing setups continue to work without changes. ([#126](https://github.com/raine/workmux/issues/126)) Fixes * Fix dashboard ignoring `mode: session` config when creating, opening, or checking out worktrees ([#129](https://github.com/raine/workmux/issues/129)) April 7, 2026 ## v0.1.178 [Section titled “v0.1.178”](#v0-1-178) * Add `--fork` flag to `workmux add` for forking an existing Claude Code conversation into a new worktree, allowing the new agent to resume with full context from a previous session. Currently Claude Code only. April 3, 2026 ## v0.1.177 [Section titled “v0.1.177”](#v0-1-177) Fixes * Fix OpenCode sandbox passing unnecessary OPENCODE\_CONFIG environment variable to containers April 3, 2026 ## v0.1.176 [Section titled “v0.1.176”](#v0-1-176) Improved * Clean up worktree-not-found error messages Fixes * Fix pi agent exiting immediately after prompt injection instead of staying in interactive mode ([#118](https://github.com/raine/workmux/issues/118) April 3, 2026 ## v0.1.175 [Section titled “v0.1.175”](#v0-1-175) * Mount OpenCode’s global config directory (`~/.config/opencode/`) into the sandbox, providing access to `opencode.json`, plugins, and global MCP definitions ([#117](https://github.com/raine/workmux/issues/117)) April 3, 2026 ## v0.1.174 [Section titled “v0.1.174”](#v0-1-174) Fixes * Fix concurrent `workmux add` commands failing with “could not lock config file” errors when creating multiple worktrees in parallel ([#116](https://github.com/raine/workmux/issues/116)) April 2, 2026 ## v0.1.173 [Section titled “v0.1.173”](#v0-1-173) * Add `--session` flag to `workmux sidebar` to scope the sidebar to a single tmux session instead of all sessions * Add sandbox image freshness checking for Apple Container runtime, notifying when a newer image is available ([#115](https://github.com/raine/workmux/issues/115)) April 2, 2026 ## v0.1.172 [Section titled “v0.1.172”](#v0-1-172) Improved * Automatically pull sandbox images when missing or stale, removing the need for manual `workmux sandbox pull` ([#115](https://github.com/raine/workmux/issues/115)) Fixes * Fix `sandbox.host_commands` shims not available in agents that use login shells (e.g. Codex, OpenCode) ([#114](https://github.com/raine/workmux/issues/114)) April 2, 2026 ## v0.1.171 [Section titled “v0.1.171”](#v0-1-171) Improved * Make project name more readable in sidebar tiles Fixes * Fix sidebar daemon dropping all clients after 30s, causing sidebar panes to stop updating * Fix sidebar width being too narrow in some windows when the sidebar was first opened from a smaller terminal April 1, 2026 ## v0.1.170 [Section titled “v0.1.170”](#v0-1-170) Improved * Fail early with a clear error when the sandbox image is missing from the selected runtime’s store ([#111](https://github.com/raine/workmux/issues/111)) April 1, 2026 ## v0.1.169 [Section titled “v0.1.169”](#v0-1-169) New * Allow `sandbox.image` in project config (`.workmux.yaml`), so custom container images are no longer silently ignored when set per-project Fixes * Fix Codex sandbox warnings about helper binaries in temporary directories and missing bubblewrap ([#110](https://github.com/raine/workmux/issues/110)) * Fix high CPU usage on Linux caused by inotify recursive watches when running multiple worktrees with active agents April 1, 2026 ## v0.1.168 [Section titled “v0.1.168”](#v0-1-168) New * Add manual sleeping toggle (`z` key) in the sidebar to deprioritize agents you don’t need to monitor, regardless of their actual status Fixes * Fix stale indicator incorrectly overriding working or waiting status icons in the sidebar, hiding statuses that require attention * Fix git diff stats permanently freezing in linked worktrees when filesystem events originated from the shared gitdir March 31, 2026 ## v0.1.166 [Section titled “v0.1.166”](#v0-1-166) Improved * Improve worktree name detection in the dashboard and sidebar, especially when running in generic tmux sessions ([#103](https://github.com/raine/workmux/pull/103)) Fixes * Fix relative `worktree_dir` paths (e.g. `../wm/`) being passed literally to sandbox commands instead of resolving `..` segments ([#105](https://github.com/raine/workmux/issues/105)) * Fix sidebar daemon signal error appearing in tmux panes on window/session changes ([#107](https://github.com/raine/workmux/issues/107)) * Fix Codex binary not found in Apple Container sandbox ([#106](https://github.com/raine/workmux/issues/106)) March 30, 2026 ## v0.1.165 [Section titled “v0.1.165”](#v0-1-165) * Add `zoom: true` pane option to maximize a pane to fullscreen after creation, useful for giving an agent pane the full window while keeping other panes available in the background ([#102](https://github.com/raine/workmux/issues/102)) March 30, 2026 ## v0.1.163 [Section titled “v0.1.163”](#v0-1-163) New * Add named layouts: define reusable pane layout presets in your config and apply them with `workmux add -l/--layout ` ([#101](https://github.com/raine/workmux/issues/101)) * Add `sandbox.env` config option for setting explicit environment variables inside sandboxed agents, with values redacted in debug logs ([#100](https://github.com/raine/workmux/pull/100)) Improved * Detect interrupted agents via pane inactivity and show interruption status in the sidebar and dashboard with elapsed time since interruption Fixes * Fix sidebar incorrectly showing all agents as done when only one finishes March 29, 2026 ## v0.1.162 [Section titled “v0.1.162”](#v0-1-162) * Add named agents: define short names for agent commands in your global config and use them anywhere you’d specify an agent. Useful for multiple accounts, wrapper scripts, or commands with long environment variable overrides March 29, 2026 ## v0.1.158 [Section titled “v0.1.158”](#v0-1-158) New * Add `sidebar`: an always-visible agent status panel in a tmux side pane, showing live status, git diff stats, and elapsed timers for all agents across windows. Toggle with `workmux sidebar`. See the [sidebar guide](https://workmux.dev/guide/sidebar/) * Two layout modes: tiles (default) and compact, switchable with `v` or via `sidebar.layout` in config * Click, scroll, or use keyboard navigation (`j`/`k`/`Enter`) to jump between agents * Width adapts to terminal size and reflows on resize Improved * Show a rebase indicator icon when a git rebase is in progress March 28, 2026 ## v0.1.157 [Section titled “v0.1.157”](#v0-1-157) Fixes * Fix `last-done` sometimes navigating to the wrong agent when multiple agents finish close together * `last-done` cycling is now reliable across repeated invocations, persisting state so the cycle survives even if the sorted order shifts March 27, 2026 ## v0.1.156 [Section titled “v0.1.156”](#v0-1-156) Improved * `workmux last-done` now includes waiting agents Fixes * Dashboard now uses configured `main_branch` for diff base detection ([#97](https://github.com/raine/workmux/issues/97)) * Fix PR status fetch being delayed 30 seconds on dashboard open March 27, 2026 ## v0.1.154 [Section titled “v0.1.154”](#v0-1-154) * Add Codex status tracking support, showing working/done states in the tmux window list March 26, 2026 ## v0.1.153 [Section titled “v0.1.153”](#v0-1-153) New * Dashboard: add `r` hotkey to remove worktree from the agents tab Improved * Dashboard: show spinner on PR column header while fetching Fixes * Fix incorrect guest home directory with Lima 2.1.0, which changed the path from `.linux` to `.guest` ([#92](https://github.com/raine/workmux/issues/92)) * Fix Nix build by adding missing output hashes for crossterm git dependency March 25, 2026 ## v0.1.152 [Section titled “v0.1.152”](#v0-1-152) New * Add `workmux resurrect` command to restore worktree windows after a tmux or computer crash, automatically resuming agent conversations from where they left off * Dashboard: add worktree creation modal with fzf-style branch picker, fuzzy search, tab completion, and the ability to checkout open pull requests directly via Ctrl+p or by typing a PR number Improved * Dashboard: dim background behind modal overlays for better visual focus March 25, 2026 ## v0.1.151 [Section titled “v0.1.151”](#v0-1-151) Fixes * Dashboard: fix immediate exit on startup caused by a stray Enter keypress from launching the command being processed before the UI was ready March 25, 2026 ## v0.1.150 [Section titled “v0.1.150”](#v0-1-150) * Add `--continue` flag to `workmux open` to resume the last agent conversation when opening a worktree * List: show worktree age in `wm ls` output as a new AGE column with human-friendly relative time (e.g., 2h, 3d, 1w) March 24, 2026 ## v0.1.149 [Section titled “v0.1.149”](#v0-1-149) Improved * Dashboard: show elapsed time for pending PR checks and the name of failing checks across all views (PR column, agents pane, worktree info panel) March 24, 2026 ## v0.1.148 [Section titled “v0.1.148”](#v0-1-148) New * Dashboard: add base branch picker (`b`) to change a worktree’s base branch from either the worktrees or agents tab * Dashboard: open PR checks page in browser with `O` (shift-o) to quickly see why checks failed Improved * Dashboard: agent task descriptions now stay up to date in real time instead of showing the initial title Fixes * Fix a crash caused by mouse coordinate overflow when using tmux 3.6a March 23, 2026 ## v0.1.147 [Section titled “v0.1.147”](#v0-1-147) * Dashboard: open a worktree’s pull request in the browser with `o` March 23, 2026 ## v0.1.146 [Section titled “v0.1.146”](#v0-1-146) New * Dashboard: add project picker (`p`) to switch between projects’ worktrees * Dashboard: show PR status and CI checks in worktree table and preview panel * Dashboard: add worktree sort modes (`s`) to cycle between natural and newest-first ordering * Dashboard: add age column to worktree table * Dashboard: add close mux window action (`c`) to stop an agent while keeping the worktree Improved * Dashboard: redesigned worktree preview with info panel and styled git log March 23, 2026 ## v0.1.145 [Section titled “v0.1.145”](#v0-1-145) * Dashboard: add worktree view as a second tab (press Tab to switch between Agents and Worktrees) * Dashboard: add bulk sweep (R) to identify and remove worktrees ready for cleanup based on merged/closed PRs, deleted remote branches, or locally merged branches * Dashboard: add X hotkey to kill an agent directly * Dashboard: add worktree remove (r) with a context-aware confirmation modal that warns about uncommitted changes or unmerged commits * Add `workmux list --json` flag for machine-readable output March 22, 2026 ## v0.1.144 [Section titled “v0.1.144”](#v0-1-144) * Add `sync-files` command to re-apply file operations (copy/symlink) to existing worktrees, with `--all` flag to sync all worktrees at once March 21, 2026 ## v0.1.143 [Section titled “v0.1.143”](#v0-1-143) Fixes * Fix `focus: true` not switching to the correct pane in session mode ([#86](https://github.com/raine/workmux/issues/86)) March 20, 2026 ## v0.1.142 [Section titled “v0.1.142”](#v0-1-142) * Add automatic worktree naming support for the pi agent ([#84](https://github.com/raine/workmux/issues/84)) March 19, 2026 ## v0.1.141 [Section titled “v0.1.141”](#v0-1-141) New * Add `--prompt-file-only` flag for editors with embedded agents (e.g., neovim with an agent plugin) that consume prompts from the filesystem instead of pane injection ([#82](https://github.com/raine/workmux/issues/82)) Improved * `workmux open` now accepts multiple worktree names in a single command (e.g., `workmux open foo bar`) March 17, 2026 ## v0.1.140 [Section titled “v0.1.140”](#v0-1-140) * Add pi agent support for status tracking and setup ([#81](https://github.com/raine/workmux/issues/81)) March 16, 2026 ## v0.1.139 [Section titled “v0.1.139”](#v0-1-139) New * Add configurable theme for dashboard * Press `T` (shift+t) in the dashboard to cycle through color schemes; selection persists to config Improved * Auto-detect dark/light mode from terminal background * Redesign dashboard footer March 14, 2026 ## v0.1.138 [Section titled “v0.1.138”](#v0-1-138) * Add `/` hotkey in the dashboard to filter agents by project and worktree name * Add `config reference` subcommand to display the full annotated default config with all available options * Add `/workmux` skill that teaches agents how to use workmux March 12, 2026 ## v0.1.137 [Section titled “v0.1.137”](#v0-1-137) Fixes * Fix multiline paste not being submitted automatically because the Enter keystroke arrived before the application finished processing the pasted content March 11, 2026 ## v0.1.136 [Section titled “v0.1.136”](#v0-1-136) * Add `base_branch` config option to set a default base branch for new worktrees, so they always branch off a specific branch (e.g. main) instead of whatever is currently checked out. The `--base` CLI flag takes precedence over config ([#78](https://github.com/raine/workmux/issues/78)) March 11, 2026 ## v0.1.135 [Section titled “v0.1.135”](#v0-1-135) Fixes * Fix auto-generated branch names containing garbage characters with kiro-cli March 9, 2026 ## v0.1.134 [Section titled “v0.1.134”](#v0-1-134) Improved * Apple Container sandboxes now default to 16 GB memory limit, preventing OOM kills during heavy workloads. Memory and CPU limits are configurable via `container.memory` and `container.cpus` in your config ([#77](https://github.com/raine/workmux/issues/77)) * Fork PRs checked out with `--pr` now automatically prefix the local branch name with the fork owner (e.g., `forkowner-main`), preventing conflicts when the fork’s branch name matches an existing local branch March 9, 2026 ## v0.1.133 [Section titled “v0.1.133”](#v0-1-133) Improved * Added logging for branch name auto-generation Fixes * Fixed OpenCode plugin’s waiting (💬) status not triggering when the agent requests permission or asks a multiple-choice question, caused by event name changes in OpenCode v2 ([#75](https://github.com/raine/workmux/pull/75)) March 6, 2026 ## v0.1.132 [Section titled “v0.1.132”](#v0-1-132) * Added support for Kiro CLI (`kiro-cli`) as a recognized agent * Added support for Mistral Vibe (`vibe`) as a recognized agent ([#76](https://github.com/raine/workmux/issues/76)) March 5, 2026 ## v0.1.131 [Section titled “v0.1.131”](#v0-1-131) New * New `--session` flag for `workmux open` lets you open worktrees in a dedicated tmux session instead of a window. Session mode is persisted, so reopening the same worktree remembers the preference ([#73](https://github.com/raine/workmux/pull/73)) * Dashboard now has a scope filter (toggle with `F`) to show only agents in the current session or all agents across sessions ([#74](https://github.com/raine/workmux/issues/74)) * Agents can now communicate across projects using the coordinator skill Improved * `workmux setup` now offers to install bundled skills (merge, rebase, worktree, coordinator) during the first-run wizard Fixes * Fixed session mode not being detected correctly when reopening a worktree after a tmux restart March 4, 2026 ## v0.1.130 [Section titled “v0.1.130”](#v0-1-130) Breaking * Window names are now automatically suffixed with the project directory name when a name collision is detected across different repositories, avoiding errors when multiple repos use the same worktree name. Explicit names set via `--name` are not modified ([#70](https://github.com/raine/workmux/issue/70)) March 2, 2026 ## v0.1.129 [Section titled “v0.1.129”](#v0-1-129) New * New `auto_name.command` config option lets you specify a custom command for branch name generation Improved * Branch name generation now automatically uses your configured AI agent (Claude, Gemini, Codex, or OpenCode) instead of requiring the `llm` CLI to be installed ([#68](https://github.com/raine/workmux/pull/68)) * **Note**: This is a breaking change. If you were previously using `llm` to generate branch names. Add `auto_name.command: 'llm'` to your global config. Fixes * `workmux rm` no longer fails with “cannot delete branch used by worktree” when a previous `workmux add` was interrupted mid-creation * Fixed zsh completions not working when installed via fpath autoloading ([#65](https://github.com/raine/workmux/pull/65)) * Fixed zsh tab completion suggesting file paths for commands that only accept worktree handles or branch names ([#65](https://github.com/raine/workmux/pull/65)) * Fixed phantom whitespace appearing in zsh completions when no candidates exist ([#65](https://github.com/raine/workmux/pull/65)) March 1, 2026 ## v0.1.128 [Section titled “v0.1.128”](#v0-1-128) Fixes * Dashboard now renders colored status icons correctly instead of showing raw tmux color codes as literal text ([#66](https://github.com/raine/workmux/issues/66)) February 28, 2026 ## v0.1.127 [Section titled “v0.1.127”](#v0-1-127) * Sandbox: Images copied to the host clipboard can now be pasted into sandboxed agents (Ctrl+V), enabling workflows like sharing screenshots with Claude Code running inside a container or VM * Merge skill: Added `--no-verify` (`-n`) flag to skip pre-merge hooks, and `-k` as a shorthand alias for `--keep` February 28, 2026 ## v0.1.126 [Section titled “v0.1.126”](#v0-1-126) New * Added `workmux update` command for self-updating workmux directly from GitHub releases. Downloads the latest version, verifies checksums, and replaces the binary in place. Homebrew-managed installs are detected and directed to use `brew upgrade` instead Improved * workmux now automatically checks for updates in the background and shows a notification when a newer version is available. Checks happen at most once per day during `workmux add`. Disable with `auto_update_check: false` in config or by setting the `WORKMUX_NO_UPDATE_CHECK` environment variable February 28, 2026 ## v0.1.125 [Section titled “v0.1.125”](#v0-1-125) New * Added Apple Container as a sandbox runtime alongside Docker and Podman, enabling sandboxing on macOS using Apple’s native container technology (macOS 26+, Apple Silicon). Auto-detected when the `container` binary is available. Configure with `runtime: apple-container` or let workmux detect it automatically Fixes * Fixed `close` command not finding the correct worktree when using a branch name that differs from the worktree handle (e.g., when created with `--name`) February 24, 2026 ## v0.1.124 [Section titled “v0.1.124”](#v0-1-124) * Added experimental Zellij backend support. Zellij is auto-detected when running inside a Zellij session. Requires Zellij built from source (uses unreleased features). See the [Zellij guide](https://workmux.dev/guide/zellij) for details and known limitations (contributed by [@Infonautica](https://github.com/Infonautica)) February 24, 2026 ## v0.1.123 [Section titled “v0.1.123”](#v0-1-123) * Add GitHub Copilot CLI as a supported agent for status tracking. Copilot hooks are installed per-repository via `workmux setup`. Note: the waiting state is not supported due to Copilot CLI hooks API limitations February 23, 2026 ## v0.1.122 [Section titled “v0.1.122”](#v0-1-122) Improved * Fork branch references (e.g., `someuser:feature`) now prefix the local branch name with the fork owner (`someuser-feature`), preventing conflicts with existing branches like `main` February 21, 2026 ## v0.1.120 [Section titled “v0.1.120”](#v0-1-120) Improved * Built-in agents (`claude`, `gemini`, `codex`, `opencode`) are now auto-detected in pane commands, so prompt injection works without the `` placeholder or a matching `agent` config. Just use the agent name directly as the pane command (e.g., `command: "codex --yolo"`) and prompts are delivered automatically. ([#57](https://github.com/raine/workmux/issues/57)) February 21, 2026 ## v0.1.119 [Section titled “v0.1.119”](#v0-1-119) * Added session mode: worktrees can now be created as their own tmux sessions instead of windows, giving each worktree a separate window list, history, and layout. Enable with `--session` flag or `mode: session` in config. * Added multi-window sessions: use the `windows` config to create multiple windows per session, each with its own pane layout - useful for setups like an editor window alongside a test runner February 19, 2026 ## v0.1.118 [Section titled “v0.1.118”](#v0-1-118) New * Added `workmux setup` command to automatically detect installed agents and configure status tracking hooks, with a guided install prompt and a tmux status bar preview showing what the icons look like Fixes * Fixed sandbox failing to start with Colima (Docker Desktop alternative for macOS) due to shim directories being created in system temp paths that Colima’s VM cannot access February 16, 2026 ## v0.1.117 [Section titled “v0.1.117”](#v0-1-117) New * Added `WORKMUX_BACKEND` environment variable to explicitly override backend auto-detection (accepts `tmux`, `wezterm`, or `kitty`) Fixes * Fixed backend detection for nested multiplexers (e.g., tmux inside kitty or wezterm) so workmux correctly targets the innermost multiplexer ([#53](https://github.com/raine/workmux/issues/53)) February 15, 2026 ## v0.1.116 [Section titled “v0.1.116”](#v0-1-116) Fixes * Fixed hooks and run commands failing when they use bash-specific syntax (e.g., arrays, process substitution), by using bash instead of sh for execution ([#52](https://github.com/raine/workmux/pull/52)) February 15, 2026 ## v0.1.114 [Section titled “v0.1.114”](#v0-1-114) Improved * Sandbox: Host git identity (user.name, user.email) is now automatically available inside sandbox environments, so git commits from sandboxed agents use the correct author February 13, 2026 ## v0.1.112 [Section titled “v0.1.112”](#v0-1-112) * Added sandbox support for running agents in isolated environments. Two backends: containers (Docker/Podman) for ephemeral sessions, and Lima VMs for persistent machines with built-in Nix/Devbox toolchain support. See the [sandbox guide](https://workmux.dev/guide/sandbox/) for setup. February 12, 2026 ## v0.1.111 [Section titled “v0.1.111”](#v0-1-111) New * Dashboard: Added Ctrl+N/Ctrl+P as alternative keybindings for navigating between rows Fixes * Fixed bash completion panic when generating completions ([#51](https://github.com/raine/workmux/pull/51)) February 11, 2026 ## v0.1.110 [Section titled “v0.1.110”](#v0-1-110) New * Added kitty as an alternative terminal backend — detected automatically when running inside kitty Improved * Improved window cleanup handling for non-tmux backends February 9, 2026 ## v0.1.109 [Section titled “v0.1.109”](#v0-1-109) * Added coordinator commands for scripting multi-agent workflows: * `send` sends text or file contents to a worktree’s agent pane * `capture` reads the last N lines from a worktree’s pane output * `status` shows the current state of worktree agents with elapsed time and git info (use `--git` for staged/unstaged indicators) * `wait` blocks until agents reach a target status (working, waiting, or done) * `run` executes a command in a worktree’s pane and streams the output in real time. * Dashboard now supports light theme via `theme: light` in config February 7, 2026 ## v0.1.108 [Section titled “v0.1.108”](#v0-1-108) New * Added positional arguments to `list` for filtering by worktree handle or branch name Improved * The `list` command now shows an AGENT column displaying the status of agents running in each worktree (working, waiting, done icons) * When piping output, agent status icons are replaced with text labels for compatibility with scripts February 4, 2026 ## v0.1.107 [Section titled “v0.1.107”](#v0-1-107) Improved * Shell autocompletion now suggests worktree names for the `close` command (bash, zsh, fish) ([#47](https://github.com/raine/workmux/issues/47)) February 4, 2026 ## v0.1.106 [Section titled “v0.1.106”](#v0-1-106) Fixes * Fixed dashboard incorrectly showing the worktree directory name instead of the project name when using a custom `worktree_dir` configuration ([#48](https://github.com/raine/workmux/pull/48)) January 31, 2026 ## v0.1.105 [Section titled “v0.1.105”](#v0-1-105) Fixes * Nerdfont setup now handles read-only config files gracefully (e.g., when symlinked to a Nix store), showing a helpful message instead of failing January 31, 2026 ## v0.1.104 [Section titled “v0.1.104”](#v0-1-104) * Added `-o`/`--open-if-exists` flag to `workmux add` for idempotent worktree creation: if the worktree already exists, switches to it instead of failing. January 30, 2026 ## v0.1.103 [Section titled “v0.1.103”](#v0-1-103) New * Added last-agent toggle (Tab key in dashboard, `workmux last-agent` CLI) to quickly switch between current and previous agent * Added `auto_name.background` config option to always run `--auto-name` agents in background mode Improved * Dashboard now shows PR status column with number and state icon (open, merged, closed, draft) for each agent’s worktree * Dashboard displays CI/CD check status alongside PRs with pass/fail/pending icons. Enable `dashboard.show_check_counts` to show pass/total counts Performance * Improved dashboard startup performance January 29, 2026 ## v0.1.102 [Section titled “v0.1.102”](#v0-1-102) New * Added experimental WezTerm backend support. workmux auto-detects the backend from environment variables. See the [WezTerm guide](https://workmux.dev/guide/wezterm) for setup instructions. (contributed by [@JeremyBYU](https://github.com/JeremyBYU)) Improved * Moved internal state management from tmux-specific mechanisms to filesystem-based JSON storage, laying the groundwork for multi-backend support * New worktrees now automatically get a symlink to a gitignored `CLAUDE.local.md` from your main worktree, so your local Claude Code instructions are available without manual setup January 29, 2026 ## v0.1.101 [Section titled “v0.1.101”](#v0-1-101) Fixes * Fixed status icons breaking tmux themes that use padding spaces in window format strings ([#45](https://github.com/raine/workmux/pull/45)) January 26, 2026 ## v0.1.100 [Section titled “v0.1.100”](#v0-1-100) * Added nested config support for monorepos: place a `.workmux.yaml` in any subdirectory to configure that project independently. When you run workmux from a subdirectory, it finds the nearest config. Working directory, file operations, and hooks are all scoped to the config directory. ([#39](https://github.com/raine/workmux/issues/39)) * Added `WM_CONFIG_DIR` environment variable for hooks, pointing to the directory containing the `.workmux.yaml` that was used January 24, 2026 ## v0.1.99 [Section titled “v0.1.99”](#v0-1-99) Improved * Dashboard: Detect and clear working agents that have stalled, for example due to being interrupted Fixes * Fixed `last-done` command intermittently failing when switching to recently completed agents January 23, 2026 ## v0.1.98 [Section titled “v0.1.98”](#v0-1-98) Improved * Tmux window names now use a nerdfont git branch icon as the default prefix when nerdfonts are available, replacing the previous “wm-” prefix. This can be overridden with `window_prefix` Fixes * Fixed cleanup commands outputting noise to the terminal after merging or removing worktrees January 23, 2026 ## v0.1.97 [Section titled “v0.1.97”](#v0-1-97) New * Added bash installer script for easier installation (`curl -fsSL ... | bash`) * Added automatic nerdfont detection with fallback icons for users without nerdfonts installed * Added `last-done` command to quickly switch to recently completed agents Fixes * Fixed race condition when running merge from inside a worktree agent January 20, 2026 ## v0.1.96 [Section titled “v0.1.96”](#v0-1-96) Performance * Reduced crate download size by excluding unnecessary files from the published package January 20, 2026 ## v0.1.95 [Section titled “v0.1.95”](#v0-1-95) Fixes * Fixed prompts failing when branch names contain slashes ([#37](https://github.com/raine/workmux/issues/37)) January 17, 2026 ## v0.1.94 [Section titled “v0.1.94”](#v0-1-94) New * Dashboard: Added `--diff` flag to open diff view directly for the current worktree, skipping the agent list Fixes * Fixed dashboard commit and merge commands not working in Claude Code when using bash command prefix (`!`) * Fixed dashboard commands including a literal newline that caused issues with OpenCode ([#35](https://github.com/raine/workmux/issues/35)) January 15, 2026 ## v0.1.93 [Section titled “v0.1.93”](#v0-1-93) New * Added Nix flake () Fixes * Fixed bash completion not passing arguments to the fallback completion function January 14, 2026 ## v0.1.92 [Section titled “v0.1.92”](#v0-1-92) Improved * Duplicate windows created with `open --new` are now placed immediately after the original window instead of at the end of the window list * `open --new` can now be run without a name argument when inside a worktree, inferring the current worktree automatically January 14, 2026 ## v0.1.91 [Section titled “v0.1.91”](#v0-1-91) Fixes * Fixed `merge` command failing with bare repo setups that use linked worktrees ([#31](https://github.com/raine/workmux/issues/31)) January 13, 2026 ## v0.1.90 [Section titled “v0.1.90”](#v0-1-90) Fixes * Fixed false “unmerged commits” warning when local main branch is ahead of the remote ([#30](https://github.com/raine/workmux/issues/30)) January 13, 2026 ## v0.1.88 [Section titled “v0.1.88”](#v0-1-88) Improved * The `merge` command now works when the target branch is checked out in a linked worktree ([#29](https://github.com/raine/workmux/issues/29)) January 13, 2026 ## v0.1.87 [Section titled “v0.1.87”](#v0-1-87) Fixes * Fixed `workmux add user/feature` incorrectly treating `user` as a remote name instead of creating a local branch named `user/feature` ([#28](https://github.com/raine/workmux/issues/28)) * Fixed worktree cleanup failing to run process stop hooks by deferring directory deletion January 11, 2026 ## v0.1.86 [Section titled “v0.1.86”](#v0-1-86) Improved * Dashboard: Preview pane size is now configurable via config file, CLI flag (`--preview-size`/`-P`), or interactively with `+`/`-` keys January 11, 2026 ## v0.1.85 [Section titled “v0.1.85”](#v0-1-85) Improved * Dashboard: Selection now stays on the same agent when the list reorders due to status changes or sorting January 11, 2026 ## v0.1.84 [Section titled “v0.1.84”](#v0-1-84) Improved * Dashboard: Improved file list layout with full paths and right-aligned stats January 10, 2026 ## v0.1.83 [Section titled “v0.1.83”](#v0-1-83) New * Dashboard: Added file list sidebar to diff and patch views * Dashboard: Added Ctrl+D/U scrolling in patch mode Improved * Dashboard: Improved diff coloring fallback when delta is not available January 10, 2026 ## v0.1.81 [Section titled “v0.1.81”](#v0-1-81) New * Dashboard: Added help screen accessible with `?` key, showing keybindings for each view (dashboard, diff, patch mode) * Dashboard: Added mouse scroll support in diff views Improved * Dashboard: The active worktree is now highlighted with a subtle background and white text for easier identification * Dashboard: Git column header shows a spinner while refreshing Fixes * Fixed agent status not showing “working” when launching with a prompt (works around [Claude Code v2.0.77 regression](https://github.com/anthropics/claude-code/issues/17284)) January 9, 2026 ## v0.1.80 [Section titled “v0.1.80”](#v0-1-80) Improved * Dashboard: Commit and merge actions are now configurable via `dashboard.commit` and `dashboard.merge` in your config file January 9, 2026 ## v0.1.79 [Section titled “v0.1.79”](#v0-1-79) Improved * Dashboard: Uncommitted changes are now shown for the main worktree Fixes * Dashboard: Fixed patch mode showing already-staged hunks January 8, 2026 ## v0.1.78 [Section titled “v0.1.78”](#v0-1-78) New * Dashboard: Added patch mode for interactive hunk-by-hunk staging with `p` key * Dashboard: Added hunk splitting to stage partial changes within a hunk * Dashboard: Added ability to undo staged changes in patch mode * Dashboard: Added hunk commenting for review workflows * Dashboard: Added diff browsing with `d` to view uncommitted changes and `D` for committed changes (toggle between WIP/review views with Tab) * Dashboard: Added filter to hide stale agents with `f` key (persists across sessions) * Dashboard: Added `c` to commit and `m` to merge directly from the main view Improved * Dashboard: Diffs now use delta for syntax highlighting when available, with fallback coloring * Dashboard: Working agents now show an animated spinner January 7, 2026 ## v0.1.77 [Section titled “v0.1.77”](#v0-1-77) New * Dashboard: Added git status column showing diff stats (+/- lines), conflict indicator, dirty state, and ahead/behind counts for each worktree * Added `--notification` flag to `merge` command to show a system notification on successful merge Improved * Dashboard: Non-default base branches (not main/master) are now displayed in the git column January 7, 2026 ## v0.1.76 [Section titled “v0.1.76”](#v0-1-76) Improved * Dashboard: Renamed “Agent” column to “Worktree” for clarity; non-workmux agents now display “main” instead of their window name * The `merge` command now auto-detects the base branch from when the worktree was created, instead of always defaulting to main Fixes * Window status icons for “waiting” and “done” again auto-clear when returning to the pane January 6, 2026 ## v0.1.75 [Section titled “v0.1.75”](#v0-1-75) New * Added OpenCode support for agent status tracking in tmux window names Fixes * Fixed passing prompt to OpenCode January 6, 2026 ## v0.1.74 [Section titled “v0.1.74”](#v0-1-74) Improved * Dashboard: Stale agents (inactive for over an hour) now show a timer icon instead of “stale” Performance * Dashboard: Preview updates are now faster in input mode January 6, 2026 ## v0.1.72 [Section titled “v0.1.72”](#v0-1-72) Breaking * Renamed “status popup” to “dashboard” January 6, 2026 ## v0.1.71 [Section titled “v0.1.71”](#v0-1-71) New * Added pane preview to the status dashboard, showing live terminal output from the selected agent * Added input mode: press `i` to send keystrokes directly to the selected agent’s pane without switching windows, press Escape to exit * Added preview scrolling with Ctrl+U/D Improved * Agents are now automatically removed from the status list when they exit * Priority sorting now uses elapsed time as a tiebreaker January 6, 2026 ## v0.1.70 [Section titled “v0.1.70”](#v0-1-70) * Added smart sorting to the status dashboard with four modes: Priority (by status importance), Project (grouped by project), Recency (newest first), and Natural (tmux order). Press `s` to cycle through modes; it is saved across sessions. January 5, 2026 ## v0.1.69 [Section titled “v0.1.69”](#v0-1-69) New * Added `status` command: a TUI dashboard for monitoring all active agents across tmux sessions, with quick-jump keys (1-9), peek mode, and keyboard navigation Fixes * The “done” (✅) status no longer gets replaced by “waiting” (💬) when Claude sends idle prompts, so completed sessions stay marked as done January 5, 2026 ## v0.1.68 [Section titled “v0.1.68”](#v0-1-68) * Added `docs` command to view the README January 4, 2026 ## v0.1.67 [Section titled “v0.1.67”](#v0-1-67) Improved * Improved compatibility with non-POSIX shells like nushell * Commands for starting agent with a prompt no longer pollute shell history January 3, 2026 ## v0.1.66 [Section titled “v0.1.66”](#v0-1-66) New * Added `--no-verify` (`-n`) flag to `merge` command to skip pre-merge hooks Improved * The `merge` command now works when run from subdirectories within a worktree January 2, 2026 ## v0.1.65 [Section titled “v0.1.65”](#v0-1-65) Breaking * The `open` command now switches to an existing window by default instead of erroring when a window already exists New * Added `--new` (`-n`) flag to `open` command to force opening a duplicate window (creates suffix like `-2`, `-3`) Improved * The `open` command now supports prompts via `-p`, `-P`, and `-e` flags, matching the `add` command January 2, 2026 ## v0.1.63 [Section titled “v0.1.63”](#v0-1-63) Improved * Linux binaries now use musl for better compatibility across different Linux distributions December 29, 2025 ## v0.1.62 [Section titled “v0.1.62”](#v0-1-62) Improved * The `merge` command with `--keep` no longer requires a clean worktree, since the worktree won’t be deleted anyway December 27, 2025 ## v0.1.61 [Section titled “v0.1.61”](#v0-1-61) Breaking * Log files are now stored in the XDG state directory (`~/.local/state/workmux/`) December 26, 2025 ## v0.1.60 [Section titled “v0.1.60”](#v0-1-60) * Added `close` command to close a worktree’s tmux window while keeping the worktree on disk. It’s basically an alias for tmux’s `kill-window` December 26, 2025 ## v0.1.59 [Section titled “v0.1.59”](#v0-1-59) New * Added `pre_merge` hook to run commands (like tests or linters) before merging, allowing you to catch issues before they land in your main branch * Added `pre_remove` hook that runs before worktree removal, with environment variables (`WM_HANDLE`, `WM_WORKTREE_PATH`, `WM_PROJECT_ROOT`) for backup or cleanup workflows Improved * The `post_create` hook now receives `WM_WORKTREE_PATH` and `WM_PROJECT_ROOT` environment variables, matching the other hooks December 23, 2025 ## v0.1.57 [Section titled “v0.1.57”](#v0-1-57) Fixes * Fixed terminal input not being displayed after creating a worktree with `workmux add` on bash ([#17](https://github.com/raine/workmux/pull/17)) December 21, 2025 ## v0.1.55 [Section titled “v0.1.55”](#v0-1-55) Improved * The `merge` command now allows untracked files in the target worktree, only blocking when there are uncommitted changes to tracked files December 17, 2025 ## v0.1.54 [Section titled “v0.1.54”](#v0-1-54) Improved * The `remove` command now accepts multiple worktree names, allowing you to clean up several worktrees in a single command (e.g., `workmux rm feature-a feature-b`) December 17, 2025 ## v0.1.53 [Section titled “v0.1.53”](#v0-1-53) New * Added JSON lines support for stdin input: pipe JSON objects to `workmux add` and each key automatically becomes a template variable, making it easy to use structured data from tools like `jq` in prompts and branch names Improved * Template errors now show which variables are missing and list available ones, helping catch typos in branch name templates or prompts before worktrees are created Fixes * Fixed “directory already exists” errors when creating worktrees after a previous cleanup was interrupted by background processes recreating files December 17, 2025 ## v0.1.52 [Section titled “v0.1.52”](#v0-1-52) * Added `--max-concurrent` flag to limit how many worktrees run simultaneously, useful for creating worker pools that process items without overwhelming system resources or hitting API rate limits * Added `{{ index }}` template variable for branch names and prompts in multi-worktree modes, providing a 1-indexed counter across all generated worktrees December 16, 2025 ## v0.1.51 [Section titled “v0.1.51”](#v0-1-51) New * Added `--wait` (`-W`) flag to `add` command to block until the created tmux window is closed, useful for scripting workflows * Added stdin input support for multi-worktree generation: pipe lines to `workmux add` to create multiple worktrees, with each line available as `{{ input }}` in prompts Fixes * Fixed duplicate remote fetch when using `--pr` or fork branch syntax (`user:branch`) December 15, 2025 ## v0.1.50 [Section titled “v0.1.50”](#v0-1-50) Fixes * Fixed a crash in `workmux completions bash` ([#14](https://github.com/raine/workmux/issues/14)) December 15, 2025 ## v0.1.49 [Section titled “v0.1.49”](#v0-1-49) New * Added `--all` flag to `remove` command to remove all worktrees at once (except the main worktree), with safety checks for uncommitted changes and unmerged commits Improved * Now shows an error when using `-p`/`--prompt` without an agent pane configured, instead of silently ignoring the prompt December 10, 2025 ## v0.1.48 [Section titled “v0.1.48”](#v0-1-48) Breaking * Removed automatic `node_modules` symlink default for Node.js projects December 9, 2025 ## v0.1.47 [Section titled “v0.1.47”](#v0-1-47) * Added `--gone` flag to `rm` command to clean up worktrees whose remote branches have been deleted (e.g., after PRs are merged) December 9, 2025 ## v0.1.46 [Section titled “v0.1.46”](#v0-1-46) * Added `--pr` flag to `list` command to show PR status alongside worktrees, displaying PR numbers and state icons (open, draft, merged, closed) * Added spinner feedback for slow operations like GitHub API calls December 8, 2025 ## v0.1.45 [Section titled “v0.1.45”](#v0-1-45) Improved * Shell completions now suggest proper values for `--base`, `--into`, and `--prompt-file` flags (bash, zsh) Fixes * Fixed an error with the `pre_delete` hook when removing worktrees that were manually deleted from the filesystem December 6, 2025 ## v0.1.44 [Section titled “v0.1.44”](#v0-1-44) Improved * In agent status tracking, the “waiting” (💬) status icon now auto-clears window is focused, matching the behavior of the “done” (✅️) status. December 5, 2025 ## v0.1.43 [Section titled “v0.1.43”](#v0-1-43) Improved * Improved the default config template generated by `workmux init` December 5, 2025 ## v0.1.42 [Section titled “v0.1.42”](#v0-1-42) * Added pre-built binaries for Linux ARM64 (aarch64) architecture December 4, 2025 ## v0.1.41 [Section titled “v0.1.41”](#v0-1-41) Improved * Commands `open`, `path`, `remove`, and `merge` now accept worktree names (the directory name shown in tmux) in addition to branch names, making it easier to work with worktrees when the directory name differs from the branch December 3, 2025 ## v0.1.40 [Section titled “v0.1.40”](#v0-1-40) * Added `--auto-name` (`-A`) flag to automatically generate branch names from your prompt using an LLM (uses the `llm` tool), so you can skip naming branches yourself * Added `auto_name.model` and `auto_name.system_prompt` config options to customize the LLM model and prompt used for branch name generation December 3, 2025 ## v0.1.39 [Section titled “v0.1.39”](#v0-1-39) Improved * New worktree windows are now inserted after the last workmux window instead of at the end of the window list, keeping your worktree windows grouped together December 3, 2025 ## v0.1.38 [Section titled “v0.1.38”](#v0-1-38) Fixes * Fixed branches created with `--base` not having upstream tracking configuration properly unset from the base branch December 3, 2025 ## v0.1.37 [Section titled “v0.1.37”](#v0-1-37) Fixes * Fixed panes not loading shell profiles, which broke tools like nvm etc. that depend on login shell initialization December 1, 2025 ## v0.1.36 [Section titled “v0.1.36”](#v0-1-36) Breaking * Removed `--delete-remote` flag from `merge` and `remove` commands New * Added `--into` flag to `merge` command for merging into branches other than main (e.g., `workmux merge feature --into develop`) Fixes * Fixed config loading and file operations when running commands from inside a worktree December 1, 2025 ## v0.1.35 [Section titled “v0.1.35”](#v0-1-35) * Added agent status tracking in tmux window names, showing icons for different Claude Code states (🤖 working, 💬 waiting, ✅ done). The “done” status auto-clears when you focus the window. November 30, 2025 ## v0.1.34 [Section titled “v0.1.34”](#v0-1-34) Fixes * Fixed worktree path calculation when running `add` from inside an existing worktree, which previously created nested paths instead of sibling worktrees November 30, 2025 ## v0.1.33 [Section titled “v0.1.33”](#v0-1-33) * Added support for GitHub fork branch format (`user:branch`) in `add` command, allowing direct checkout of fork branches copied from GitHub’s UI November 30, 2025 ## v0.1.32 [Section titled “v0.1.32”](#v0-1-32) * Added OpenCode agent support: prompts are now automatically passed using the `-p` flag when using `--prompt-file` or `--prompt-editor` with `--agent opencode` November 29, 2025 ## v0.1.31 [Section titled “v0.1.31”](#v0-1-31) * Added `path` command to get the filesystem path of a worktree by branch name * Added `--name` flag to `add` command for explicit worktree directory and tmux window naming * Added `worktree_naming` config option to control how worktree names are derived from branches (`full` or `basename`) * Added `worktree_prefix` config option to add a prefix to all worktree directory names * Added `merge_strategy` config option to set default merge behavior (merge, rebase, or squash) November 27, 2025 ## v0.1.30 [Section titled “v0.1.30”](#v0-1-30) New * Added nushell support for pane startup commands Improved * Improved reliability of pane command execution across different shells November 26, 2025 ## v0.1.29 [Section titled “v0.1.29”](#v0-1-29) Improved * Shell completions now suggest git branch names when using the `add` command November 26, 2025 ## v0.1.28 [Section titled “v0.1.28”](#v0-1-28) Improved * Shell completions now dynamically suggest branch names when pressing TAB for `open`, `merge`, and `remove` commands (bash, zsh, fish) November 25, 2025 ## v0.1.26 [Section titled “v0.1.26”](#v0-1-26) New * Added `--pr` flag to checkout a GitHub pull request directly into a new worktree Improved * Improved list output with cleaner table formatting and relative paths Fixes * Fixed version managers (nvm, pnpm, mise, etc.) being shadowed by stale PATH entries when running pane commands * Fixed duplicate command announcement when running merge workflow November 22, 2025 ## v0.1.24 [Section titled “v0.1.24”](#v0-1-24) Improved * Merge conflicts now abort cleanly, keeping your main worktree in a usable state with guidance on how to resolve Fixes * Fixed “can’t find pane: 0” errors when using `pane-base-index 1` in tmux configuration November 22, 2025 ## v0.1.23 [Section titled “v0.1.23”](#v0-1-23) New * Added `--keep` flag to merge command to merge without cleaning up the worktree, useful for verifying the merge before removing the branch Improved * After closing a worktree (merge or remove), the terminal now navigates back to the main worktree instead of staying in the deleted directory Fixes * Fixed a bug where multi-agent worktrees had incorrect agent configuration for worktrees after the first one November 21, 2025 ## v0.1.22 [Section titled “v0.1.22”](#v0-1-22) New * Added YAML frontmatter support in prompt files for defining variable matrices (`foreach`), making it easier to specify multi-worktree generation without CLI flags * Added `size` and `percentage` options for pane configuration to control pane dimensions when splitting Fixes * Fixed prompt editor temporary file now using `.md` extension for better editor syntax highlighting * Fixed Gemini agent startup issues November 18, 2025 ## v0.1.21 [Section titled “v0.1.21”](#v0-1-21) Breaking * Switched templating engine from Tera to MiniJinja (Jinja2-compatible) for branch names and prompts. Existing templates should work unchanged. November 18, 2025 ## v0.1.20 [Section titled “v0.1.20”](#v0-1-20) Improved * The `rm` command now automatically uses the correct base branch that was used when the worktree was created, instead of defaulting to the main branch Fixes * Fixed prompts starting with a dash (e.g. ”- foo”) being incorrectly interpreted as CLI flags November 17, 2025 ## v0.1.19 [Section titled “v0.1.19”](#v0-1-19) * Added `--with-changes` flag to `add` command: move uncommitted changes from your current worktree to a new one, useful when you’ve started working on the wrong branch * Added `--patch` flag: interactively select which changes to move when using `--with-changes` * Added `--include-untracked` (`-u`) flag: include untracked files when moving changes November 17, 2025 ## v0.1.18 [Section titled “v0.1.18”](#v0-1-18) Breaking * New branches now default to branching from your currently checked out branch instead of the main branch’s remote tracking branch * Removed the `--from-current` flag (no longer needed since this is now the default behavior) November 17, 2025 ## v0.1.17 [Section titled “v0.1.17”](#v0-1-17) * Added multi-agent workflows: create multiple worktrees from a single command using `-a agent1 -a agent2`, `-n count`, or `--foreach` matrix options * Added background mode (`-b`, `--background`) to create worktrees without switching to them * Added support for prompt templating with variables like `{{ agent }}`, `{{ num }}`, and custom `--foreach` variables * Added `--branch-template` option to customize generated branch names November 16, 2025 ## v0.1.16 [Section titled “v0.1.16”](#v0-1-16) Breaking * Defaulted to current branch as base for `workmux add` (errors on detached HEAD without explicit `--base`) New * Added `--prompt-editor` (`-e`) flag to write prompts using your `$EDITOR` * Added configurable agent support with `--agent` (`-a`) flag and config option * Added flags to skip setup steps: `--no-hooks`, `--no-file-ops`, `--no-pane-cmds` Fixes * Fixed aliases containing `` placeholder not resolving correctly November 15, 2025 ## v0.1.15 [Section titled “v0.1.15”](#v0-1-15) * Added `--prompt` (`-p`) and `--prompt-file` (`-P`) options to `workmux add` for attaching a prompt to new worktrees * Added `--keep-branch` (`-k`) option to `workmux remove` to preserve the local branch while removing the worktree and tmux window November 14, 2025 ## v0.1.14 [Section titled “v0.1.14”](#v0-1-14) * Added `--base` option to specify a base branch, commit, or tag when creating a new worktree * Added `--from-current` (`-c`) flag to use the current branch as the base, useful for stacking feature branches * Added support for creating worktrees from remote branches (e.g., `workmux add origin/feature-branch`) * Added support for copying directories (not just files) in file operations November 13, 2025 ## v0.1.13 [Section titled “v0.1.13”](#v0-1-13) New * Added safety check to prevent accidentally deleting a branch that’s checked out in the main worktree Fixes * Fixed `merge` and `remove` commands failing when run from within the worktree being deleted * Fixed pane startup commands not loading shell environment tools (like direnv, nvm, rbenv) before running November 11, 2025 ## v0.1.11 [Section titled “v0.1.11”](#v0-1-11) New * Added `pre_delete` hooks that run before worktree deletion, with automatic detection of Node.js projects to fast-delete `node_modules` directories in the background * Added `target` option for panes to split from any existing pane, not just the most recent one Improved * Pane commands now keep an interactive shell open after completion, and panes can be created without a command (just a shell) * Tmux panes now use login shells for consistent environment across all panes * The `create` command now displays which base branch was used * Improved validation for pane configurations with helpful error messages November 9, 2025 ## v0.1.10 [Section titled “v0.1.10”](#v0-1-10) Improved * Post-create hooks now run before the tmux window opens, so the new window appears ready to use instead of showing setup commands running November 9, 2025 ## v0.1.9 [Section titled “v0.1.9”](#v0-1-9) Fixes * Fixed cleanup when removing a worktree from within its own tmux window November 9, 2025 ## v0.1.7 [Section titled “v0.1.7”](#v0-1-7) Fixes * Fixed a race condition where cleaning up a worktree could fail if the tmux window hadn’t fully closed yet November 9, 2025 ## v0.1.6 [Section titled “v0.1.6”](#v0-1-6) * Automatically run `pnpm install` when creating worktrees in pnpm projects November 8, 2025 ## v0.1.5 [Section titled “v0.1.5”](#v0-1-5) Fixes * Fixed global config to always load from `~/.config/workmux/` instead of platform-specific locations (e.g., `~/Library/Application Support/` on macOS) November 7, 2025 ## v0.1.4 [Section titled “v0.1.4”](#v0-1-4) Breaking * New worktree branches no longer track a remote upstream by default New * Added `--from` flag to `add` command to specify which branch, commit, or tag to branch from Fixes * Fixed `rm` command failing when run from within the worktree being removed November 6, 2025 ## v0.1.3 [Section titled “v0.1.3”](#v0-1-3) New * Added global configuration support with XDG compliance, so you can set shared defaults in `~/.config/workmux/config.yaml` that apply across all projects * Project configs can inherit from global settings using `` placeholder in lists Improved * After merging or removing a worktree, automatically switches to the main branch tmux window if it exists Fixes * Fixed an issue where removing a worktree could fail if the current directory was inside that worktree November 5, 2025 ## v0.1.2 [Section titled “v0.1.2”](#v0-1-2) Fixes * Fixed `prune` command to correctly parse Claude Code’s config file structure November 5, 2025 ## v0.1.1 [Section titled “v0.1.1”](#v0-1-1) Initial release. New * Added `open` command to switch to an existing worktree’s tmux window * Added `--rebase` and `--squash` merge strategies to the `merge` command * Added `claude prune` command to clean up stale worktree entries from Claude’s config * Added configurable window name prefix via `window_prefix` setting Improved * Allowed `remove` command to work without arguments to remove the current branch * Shell completion now works with command aliases Fixes * Fixed merge command not cleaning up worktrees after merging * Fixed worktree deletion issues when running from within the worktree * Fixed new branches being incorrectly flagged as unmerged # What is workmux? > A workflow tool for managing git worktrees and tmux windows as isolated development environments for AI agents workmux is a giga opinionated zero-friction workflow tool for managing [git worktrees](https://git-scm.com/docs/git-worktree) and tmux windows as isolated development environments. Also supports [kitty](/guide/kitty/), [WezTerm](/guide/wezterm/), and [Zellij](/guide/zellij/) (experimental). Perfect for running multiple AI agents in parallel without conflict. **Philosophy**: Build on tools you already use. tmux/zellij/kitty/etc. for windowing, git for worktrees, your agent for coding - workmux orchestrates the rest. New to workmux? Read the [introduction blog post](https://raine.dev/blog/introduction-to-workmux/) for a quick overview. ## Why workmux? [Section titled “Why workmux?”](#why-workmux) **Parallel workflows.** Work on multiple features at the same time, each with its own AI agent. No stashing, no branch switching, no conflicts. **One window per task.** A natural mental model. Each has its own terminal state, editor session, dev server, and AI agent. Context switching is switching tabs. **Automated setup.** New worktrees start broken (no `.env`, no `node_modules`, no dev server). workmux can copy config files, symlink dependencies, and run install commands on creation. **One-command cleanup.** `workmux merge` handles the full lifecycle: merge the branch, delete the worktree, close the tmux window, remove the local branch. Or go next level and use the [`/merge` skill](/guide/skills/#merge) to let your agent commit, rebase, and merge autonomously. **Terminal workflow.** Build on your terminal setup instead of yet another agentic GUI that won’t exist next year. If you don’t have one yet, [tmux might be worth picking up](https://raine.dev/blog/my-tmux-setup/). Also supports [Kitty](/guide/kitty/), [WezTerm](/guide/wezterm/), and [Zellij](/guide/zellij/). Terminal ![workmux sidebar alongside an AI agent and editor in tmux](/_astro/hero-screenshot.CNveDQ-8_5zQuw.webp)Worktrees ## Features [Section titled “Features”](#features) * Create git worktrees with matching tmux windows (or kitty/WezTerm/Zellij tabs) in a single command (`add`) * Merge branches and clean up everything (worktree, tmux window, branches) in one command (`merge`) * [Dashboard](/guide/dashboard/) for monitoring agents, reviewing changes, and sending commands * [Delegate tasks to worktree agents](/guide/skills/#worktree) with a `/worktree` skill * [Display Claude agent status in tmux window names](/guide/status-tracking/) * Automatically set up your preferred tmux pane layout (editor, shell, watchers, etc.) * Run post-creation hooks (install dependencies, setup database, etc.) * Copy or symlink configuration files (`.env`, `node_modules`) into new worktrees * [Sandbox agents](/guide/sandbox/) in containers or VMs for enhanced security * [Automatic branch name generation](/reference/commands/add/#automatic-branch-name-generation) from prompts using LLM * Shell completions ## Before and after [Section titled “Before and after”](#before-and-after) workmux turns a multi-step manual workflow into simple commands, making parallel development workflows practical. ### Without workmux [Section titled “Without workmux”](#without-workmux) ```bash # 1. Manually create the worktree and environment git worktree add ../worktrees/user-auth -b user-auth cd ../worktrees/user-auth cp ../../project/.env.example .env ln -s ../../project/node_modules . npm install # ... and other setup steps # 2. Manually create and configure the tmux window tmux new-window -n user-auth tmux split-window -h 'npm run dev' tmux send-keys -t 0 'claude' C-m # ... repeat for every pane in your desired layout # 3. When done, manually merge and clean everything up cd ../../project git switch main && git pull git merge --no-ff user-auth tmux kill-window -t user-auth git worktree remove ../worktrees/user-auth git branch -d user-auth ``` ### With workmux [Section titled “With workmux”](#with-workmux) ```bash # Create the environment workmux add user-auth # ... work on the feature ... # Merge and clean up workmux merge ``` ## Why git worktrees? [Section titled “Why git worktrees?”](#why-git-worktrees) [Git worktrees](https://git-scm.com/docs/git-worktree) let you have multiple branches checked out at once in the same repository, each in a separate directory. This provides two main advantages over a standard single-directory setup: * **Painless context switching**: Switch between tasks just by changing directories (`cd ../other-branch`). There’s no need to `git stash` or make temporary commits. Your work-in-progress, editor state, and command history remain isolated and intact for each branch. * **True parallel development**: Work on multiple branches simultaneously without interference. You can run builds, install dependencies (`npm install`), or run tests in one worktree while actively coding in another. This isolation is perfect for running multiple AI agents in parallel on different tasks. In a standard Git setup, switching branches disrupts your flow by requiring a clean working tree. Worktrees remove this friction. `workmux` automates the entire process and pairs each worktree with a dedicated tmux window, creating fully isolated development environments. ## Requirements [Section titled “Requirements”](#requirements) * Git 2.5+ (for worktree support) * tmux (or [WezTerm](/guide/wezterm/), [kitty](/guide/kitty/), or [Zellij](/guide/zellij/)) ## Inspiration and related tools [Section titled “Inspiration and related tools”](#inspiration-and-related-tools) workmux is inspired by [wtp](https://github.com/satococoa/wtp), an excellent git worktree management tool. While wtp streamlines worktree creation and setup, workmux takes this further by tightly coupling worktrees with tmux window management. For managing multiple AI agents in parallel, tools like [claude-squad](https://github.com/smtg-ai/claude-squad) and [vibe-kanban](https://github.com/BloopAI/vibe-kanban/) offer dedicated interfaces, like a TUI or kanban board. In contrast, workmux adheres to its philosophy that **tmux is the interface**, providing a native tmux experience for managing parallel workflows without requiring a separate interface to learn. ## Related projects [Section titled “Related projects”](#related-projects) * [tmux-tools](https://github.com/raine/tmux-tools) - Collection of tmux utilities including file picker, smart sessions, and more * [tmux-file-picker](https://github.com/raine/tmux-file-picker) - Pop up fzf in tmux to quickly insert file paths, perfect for AI coding assistants * [tmux-bro](https://github.com/raine/tmux-bro) - Smart tmux session manager that sets up project-specific sessions automatically * [claude-history](https://github.com/raine/claude-history) - Search and view Claude Code conversation history with fzf * [consult-llm-mcp](https://github.com/raine/consult-llm-mcp) - MCP server that lets Claude Code consult stronger AI models (o3, Gemini, GPT-5.1 Codex) # AI agents > Run multiple AI agents in parallel, each in their own isolated git worktree environment workmux is designed with AI agent workflows in mind. Run multiple agents in parallel, each in their own isolated environment. ## Agent integration [Section titled “Agent integration”](#agent-integration) When you provide a prompt via `--prompt`, `--prompt-file`, or `--prompt-editor`, workmux automatically injects the prompt into panes running the configured agent command (e.g., `claude`, `codex`, `copilot`, `opencode`, `gemini`, `agy`, `kiro-cli`, `vibe`, `pi`, `omp`, `grok`, or whatever you’ve set via the `agent` config or `--agent` flag) without requiring any `.workmux.yaml` changes: * Panes with a command matching the configured agent are automatically started with the given prompt. * You can keep your `.workmux.yaml` pane configuration simple (e.g., `panes: [{ command: "" }]`) and let workmux handle prompt injection at runtime. This means you can launch AI agents with task-specific prompts without modifying your project configuration for each task. ### Examples [Section titled “Examples”](#examples) ```bash # Create a worktree with an inline prompt workmux add feature/auth -p "Implement user authentication with OAuth" # Create a worktree with a prompt from a file workmux add feature/refactor --prompt-file task-description.md # Open your editor to write a prompt interactively workmux add feature/new-api --prompt-editor # Override the default agent for a specific worktree workmux add feature/caching -a gemini -p "Add caching layer for API responses" # Use -A to generate branch name from the prompt automatically workmux add -A -p "Fix race condition in payment handler" # Use -A alone to open editor for prompt, then generate branch name from it workmux add -A ``` Tip The `-A` (`--auto-name`) flag uses an LLM to [generate a branch name](/reference/commands/add/#automatic-branch-name-generation) from your prompt, so you don’t have to think of one. ## Embedded agent mode [Section titled “Embedded agent mode”](#embedded-agent-mode) If your editor has a built-in agent (e.g., neovim with an agent plugin), you can use `--prompt-file-only` to write the prompt to `.workmux/PROMPT-.md` without requiring an agent pane: ```bash workmux add feature/task -P task.md --prompt-file-only ``` Your editor can then detect the prompt file on startup and pass it to its embedded agent. Set `prompt_file_only: true` in `.workmux.yaml` to make this the default. ## Named agents [Section titled “Named agents”](#named-agents) Define short names for agent profiles in your global config. This is useful when you have multiple accounts, custom wrapper scripts, extra arguments, or environment variable overrides: \~/.config/workmux/config.yaml ```yaml agents: cc-work: "claude" cc-personal: type: claude command: claude env: CLAUDE_CONFIG_DIR: ~/.claude-personal cod-mini: type: codex command: codex args: - exec - -m - gpt-5.1-codex-mini pi-luna-max: type: pi command: pi args: - --model - openai-codex/gpt-5.6-luna - --thinking - max ``` Use named agents anywhere you’d use an agent name: ```bash # CLI workmux add oauth -a pi-luna-max -p "Implement history/2026-08-29-oauth-plan.md" # In .workmux.yaml agent: pi-luna-max ``` workmux resolves the name to a structured command before launching panes. The agent profile controls prompt injection format, continue/resume flags, skip-permissions flags, and sandbox behavior. Set `type` when the command is a wrapper or when you omit `command` and want the built-in executable for that agent type: ```yaml agents: cc-smart: type: claude command: /path/to/smart-picker args: - -p env: ANTHROPIC_BASE_URL: http://localhost:18765 ANTHROPIC_AUTH_TOKEN: from_env: ANTHROPIC_AUTH_TOKEN ``` For example, this profile runs Claude Code through [claude-code-proxy](https://github.com/raine/claude-code-proxy) with Cursor’s `composer-2.5-fast` model: ```yaml agents: claude-composer-fast: type: claude command: /Users/raine/.local/bin/claude args: - --dangerously-skip-permissions env: ANTHROPIC_BASE_URL: http://localhost:18765 ANTHROPIC_AUTH_TOKEN: anything ANTHROPIC_MODEL: composer-2.5-fast ANTHROPIC_SMALL_FAST_MODEL: composer-2.5-fast CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: "1" CLAUDE_CODE_DISABLE_AUTO_MEMORY: "1" CLAUDE_CODE_DISABLE_NONSTREAMING_FALLBACK: "1" CLAUDE_CODE_EFFORT_LEVEL: max CLAUDE_CODE_ENABLE_TELEMETRY: "0" ``` Structured profiles support these fields: * `type`: Built-in agent behavior to use (`claude`, `gemini`, `codex`, etc.) * `command`: Executable or command string to launch. Defaults to `type` or profile name * `args`: Literal arguments appended after the command, before injected prompts * `env`: Environment variables set for the agent process. Values can be literal strings or `{ from_env: NAME }` to read the value from the launch environment String entries still work for simple aliases, but structured profiles avoid quoting long commands by hand. Tip Named agents are global-only for security. Define them in `~/.config/workmux/config.yaml`, not in project `.workmux.yaml` files. Project configs can reference them but not define them. ## Per-pane agents [Section titled “Per-pane agents”](#per-pane-agents) workmux automatically recognizes built-in agent commands (`claude`, `gemini`, `agy`, `codex`, `copilot`, `opencode`, `kiro-cli`, `vibe`, `pi`, `omp`, `grok`) in pane commands. This means prompt injection works without the `` placeholder or a matching `agent` config: ```yaml panes: - command: "claude --dangerously-skip-permissions" focus: true - command: "codex --yolo" split: vertical ``` Each agent receives the prompt using its native format (e.g., Claude uses `--`, Gemini and Antigravity use `-i`, and Copilot uses `--interactive=`). Auto-detection matches the executable name regardless of flags or path. Just provide a prompt via `-p`, `-P`, or `-e`. Antigravity CLI support covers command detection, prompt injection, and status tracking through lifecycle hooks installed by `workmux setup`. See [pane configuration](/guide/configuration/#agent-placeholders) for details. ## Named layouts with agents [Section titled “Named layouts with agents”](#named-layouts-with-agents) Use [named layouts](/guide/configuration/#named-layouts) to define reusable pane arrangements with different agent combinations: ```yaml layouts: design: panes: - command: claude focus: true - command: codex split: vertical solo: panes: - command: claude ``` ```bash # Two agents side by side workmux add my-feature -l design -p "Implement the new search API" # Single agent workmux add quick-fix -l solo -p "Fix the login bug" ``` When a layout is selected with `-l`, its panes replace the top-level `panes`. All other config (hooks, files, etc.) comes from the top-level as usual. ## Parallel workflows [Section titled “Parallel workflows”](#parallel-workflows) workmux can generate multiple worktrees from a single `add` command, which is ideal for running parallel experiments or delegating tasks to multiple AI agents. ### Multi-agent example [Section titled “Multi-agent example”](#multi-agent-example) ```bash # Create one worktree for claude and one for gemini with a focused prompt workmux add my-feature -a claude -a gemini -p "Implement the new search API integration" # Generates worktrees: my-feature-claude, my-feature-gemini # Create 2 instances of the default agent workmux add my-feature -n 2 -p "Implement task #{{ num }} in TASKS.md" # Generates worktrees: my-feature-1, my-feature-2 ``` See the [add command reference](/reference/commands/add/) for all parallel workflow options. # Claude Code > Configure Claude Code permissions and settings for use with workmux worktrees ## Permissions [Section titled “Permissions”](#permissions) By default, Claude Code prompts for permission before running commands. There are several ways to handle this in worktrees: ### Share permissions across worktrees [Section titled “Share permissions across worktrees”](#share-permissions-across-worktrees) To keep permission prompts but share granted permissions across worktrees: ```yaml files: symlink: - .claude/settings.local.json ``` Add this to your global config (`~/.config/workmux/config.yaml`) or project’s `.workmux.yaml`. Since this file contains user-specific permissions, also add it to `.gitignore`: ```plaintext .claude/settings.local.json ``` ### Skip permission prompts (yolo mode) [Section titled “Skip permission prompts (yolo mode)”](#skip-permission-prompts-yolo-mode) To skip prompts entirely, define a named agent with the flag: \~/.config/workmux/config.yaml ```yaml agents: claude: "claude --dangerously-skip-permissions" ``` This shadows the built-in `claude` name so all workmux-created worktrees use the flag automatically, without affecting `claude` outside of workmux. You can also use a separate name and reference it per-project: \~/.config/workmux/config.yaml ```yaml agents: cc-yolo: "claude --dangerously-skip-permissions" # .workmux.yaml (in projects that need it) agent: cc-yolo ``` ## Continuing a conversation in a worktree [Section titled “Continuing a conversation in a worktree”](#continuing-a-conversation-in-a-worktree) Sometimes you want to continue a Claude conversation inside a worktree. Since worktrees are technically separate project directories, Claude Code treats them as different projects, so you cannot directly resume a conversation that started in another worktree (or the main tree). [claude-history](https://github.com/raine/claude-history) solves this with its cross-project fork feature. Use `--global` mode to search conversations across all projects, then fork the one you want: ```sh claude-history --global ``` Select a conversation and press `Ctrl+F` to fork it. When the conversation belongs to a different project than your current directory, claude-history automatically copies the session files into the current project and resumes there. The forked conversation then lives in the worktree as if it started there. ## Multiple Claude configurations (work/personal) [Section titled “Multiple Claude configurations (work/personal)”](#multiple-claude-configurations-workpersonal) If you use separate Claude configurations for work and personal projects, define [named agents](/guide/agents/#named-agents) in your global config: \~/.config/workmux/config.yaml ```yaml agents: cc-work: "env CLAUDE_CONFIG_DIR=~/.claude-work claude" cc-personal: "env CLAUDE_CONFIG_DIR=~/.claude-personal claude" ``` Then set the agent per project: ```yaml # work project .workmux.yaml agent: cc-work ``` Or use it directly: `workmux add feature -a cc-work`. ### Alternative: direnv [Section titled “Alternative: direnv”](#alternative-direnv) You can also use [`CLAUDE_CONFIG_DIR`](https://code.claude.com/docs/en/env-vars) with [direnv](https://direnv.net/) to switch configurations per directory. This affects `claude` everywhere, not just workmux: .envrc ```bash export CLAUDE_CONFIG_DIR=~/.claude-work ``` # Configuration > Configure workmux with global defaults and project-specific settings workmux uses a two-level configuration system: * **Global** (`~/.config/workmux/config.yaml`): Personal defaults for all projects. Run `workmux config edit` to open it in your editor. * **Project** (`.workmux.yaml`): Project-specific overrides Project settings override global settings. When you run workmux from a subdirectory, it walks upward to find the nearest `.workmux.yaml`, allowing nested configs for monorepos. See [Monorepos](/guide/monorepos/#nested-configuration) for details. For hook lists (`post_create`, `pre_merge`, `pre_remove`) and file operation lists (`files.copy`, `files.symlink`, `remote_files.copy`, `remote_files.symlink`), you can use `""` to include global values alongside project-specific ones. Other settings like `panes` are replaced entirely when defined in the project config. ## XDG Base Directory support [Section titled “XDG Base Directory support”](#xdg-base-directory-support) workmux respects the [XDG Base Directory Specification](https://specifications.freedesktop.org/basedir/latest/): | Purpose | Environment variable | Default | | ------------- | -------------------- | ---------------- | | Configuration | `XDG_CONFIG_HOME` | `~/.config` | | Cache | `XDG_CACHE_HOME` | `~/.cache` | | State | `XDG_STATE_HOME` | `~/.local/state` | All workmux files live under a `workmux/` subdirectory within these base directories. If you have an existing config at the default location and later set a custom `XDG_CONFIG_HOME`, workmux will fall back to reading from `~/.config/workmux/` if no config exists at the new location. The host-side log lives at `$XDG_STATE_HOME/workmux/workmux.log` and includes sandbox network-proxy rejections - see [Debugging blocked requests](/guide/sandbox/features/#debugging-blocked-requests). ## Global configuration example [Section titled “Global configuration example”](#global-configuration-example) `~/.config/workmux/config.yaml`: ```yaml nerdfont: true # Enable nerdfont icons (prompted on first run) merge_strategy: rebase # Make workmux merge do rebase by default merge_keep: true # Keep worktree, window, and branch after merge by default agent: claude panes: - command: # Start the configured agent (e.g., claude) focus: true - split: horizontal # Second pane with default shell ``` ## Project configuration example [Section titled “Project configuration example”](#project-configuration-example) `.workmux.yaml`: ```yaml post_create: - "" - mise use files: symlink: - "" # Include global symlinks (node_modules) - .pnpm-store # Add project-specific symlink panes: - command: pnpm install focus: true - command: split: horizontal - command: pnpm run dev split: vertical ``` For a real-world example, see [workmux’s own `.workmux.yaml`](https://github.com/raine/workmux/blob/main/.workmux.yaml). ## Configuration options [Section titled “Configuration options”](#configuration-options) Most options have sensible defaults. You only need to configure what you want to customize. ### Basic options [Section titled “Basic options”](#basic-options) | Option | Description | Default | | ------------------ | -------------------------------------------------------------------------------------- | --------------------------- | | `main_branch` | Branch to merge into | Auto-detected | | `base_branch` | Default base ref for new worktrees, or `auto` for the effective main branch | Current branch | | `worktree_dir` | Directory for worktrees (absolute or relative). Supports `~` and `{project}`. | `__worktrees/` | | `nerdfont` | Enable nerdfont icons (prompted on first run) | Prompted | | `window_prefix` | Override tmux window/session prefix. Supports `{project}`. | Icon or `wm-` | | `window_placement` | New tmux window placement (`after_current` or `rightmost`) | `after_current` | | `agent` | Default agent for `` placeholder | `claude` | | `agents` | Named agent commands (global-only). See [named agents](/guide/agents/#named-agents). | `{}` | | `prompt_file_only` | Write prompt files without injecting into agent commands | `false` | | `merge_strategy` | Default merge strategy (`merge`, `rebase`, `squash`) | `merge` | | `merge_keep` | Keep resources after `workmux merge` by default | `false` | | `theme` | Dashboard color scheme (see [themes](#themes)) | `default` (auto dark/light) | | `mode` | Tmux mode (`window` or `session`). See [session mode](/guide/session-mode/). | `window` | | `default_session` | Session to return to when a workmux session closes (session mode) | Previous session | | `placement` | Where `workmux add` creates agents: `local` or a remote name. See [remotes](#remotes). | `local` | Set `base_branch: auto` to create new branches from the effective main branch, regardless of the currently checked-out branch. Workmux uses configured `main_branch`, then the local `origin/HEAD`, `main`, or `master`. Detection uses local Git state and does not fetch. An explicit `workmux add --base` takes precedence. When `base_branch` is omitted, new branches use the checked-out branch. ### Project names and worktree paths [Section titled “Project names and worktree paths”](#project-names-and-worktree-paths) In `window_prefix` and `worktree_dir`, `{project}` resolves to the same name from any checkout of a repository. Regular repositories use the main checkout’s directory name. For bare repositories, a dot-prefixed directory uses its parent’s name; other directory names have one trailing `.git` removed. | Repository | `{project}` | Relative `worktree_dir` base | | ---------------------------------- | ------------ | ----------------------------- | | Regular `/repos/my-project` | `my-project` | `/repos/my-project` | | Bare `/repos/my-project` | `my-project` | `/repos/my-project` | | Bare `/repos/my-project/.bare` | `my-project` | `/repos/my-project/.bare` | | Bare `/repos/my-project/.anything` | `my-project` | `/repos/my-project/.anything` | | Bare `/repos/my-project/.git` | `my-project` | `/repos/my-project` | | Bare `/repos/my-project.git` | `my-project` | `/repos/my-project.git` | Git reports a bare directory named `.git` using its parent as the main worktree anchor. Other bare directories are their own anchors. For example, `worktree_dir: "../"` places checkouts beside `.bare`, but alongside `my-project` for the `my-project/.git` layout. Regular checkouts named `.my-project` or `my-project.git` keep those names. A bare `my-project.git/.bare` uses its parent name `my-project.git` verbatim. Without an explicit `worktree_dir`, the default directory is a sibling of the anchor, named `__worktrees`. Changing a resolved prefix does not rename existing windows or sessions; close them before changing the prefix and reopen them afterward. Changing a templated worktree directory affects new worktrees, not existing ones. ### Remotes [Section titled “Remotes”](#remotes) `remotes` defines the SSH servers that can run agents. See [remote servers](/guide/remote/) for setup and usage. \~/.config/workmux/config.yaml ```yaml remotes: devbox: host: devbox path: ~/.workmux-node # isolation: container # optional: force Docker regardless of sandbox.enabled placement: devbox ``` | Option | Description | Default | | -------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ------------------------- | | `remotes..host` | SSH destination: an alias from `~/.ssh/config` or `user@host` | required | | `remotes..path` | Node root on the remote: `~`, a path starting with `~/` (expanded on the remote), or an absolute path | `~/.workmux-node` | | `remotes..isolation` | `container` forces Docker; `none` forces host execution. See [server or Docker](/guide/remote/setup/#server-or-docker) | follows `sandbox.enabled` | | `remotes..binary` | Local path to a Linux `workmux` binary to install instead of the matching release | none | `remotes` is global-only: in a project’s `.workmux.yaml` it is ignored with a warning. Unknown keys under a remote are an error. `placement` sets where `workmux add` creates agents when neither `--remote` nor `--local` is given. It can be set globally or per project; the project value wins. It can only name a remote from the global `remotes`, and it is ignored when no remotes are configured. ### Themes [Section titled “Themes”](#themes) The dashboard supports 12 color schemes, each with dark and light variants. Dark/light mode is auto-detected from your terminal background. Press `T` (shift+t) in the dashboard to cycle through schemes. The selection persists to your global config (`~/.config/workmux/config.yaml`). Available schemes: `default`, `emberforge`, `glacier-signal`, `obsidian-pop`, `slate-garden`, `phosphor-arcade`, `lasergrid`, `mossfire`, `night-sorbet`, `graphite-code`, `festival-circuit`, `teal-drift`. ```yaml # Just a scheme name (auto-detect dark/light) theme: emberforge # Force a specific mode theme: scheme: emberforge mode: light ``` #### Custom colors [Section titled “Custom colors”](#custom-colors) You can override individual palette colors using the `custom` block. Custom colors are applied on top of the base scheme, so you can start from any built-in theme and tweak specific colors. Values can be hex colors (`"#51afef"`), named colors (`red`, `cyan`), or terminal color indices (`42`): ```yaml theme: custom: bg: "#282c34" fg: "#bbc2cf" accent: "#51afef" success: "#98be65" warning: "#ECBE7B" error: "#ff6c6b" ``` You can also combine custom colors with a specific scheme and mode: ```yaml theme: scheme: emberforge mode: dark custom: accent: "#51afef" danger: "#ff6c6b" ``` **Shorthand aliases:** `bg` for `current_row_bg`, `fg` for `text`, `error` for `danger`. **All palette fields:** `current_row_bg`, `highlight_row_bg`, `current_worktree_fg`, `dimmed`, `text`, `border`, `help_border`, `help_muted`, `header`, `keycap`, `info`, `success`, `warning`, `danger`, `accent`. Custom colors persist when cycling themes with `T`. ### Naming options [Section titled “Naming options”](#naming-options) | Option | Description | Default | | ----------------- | ------------------------------------------- | ------- | | `worktree_naming` | How to derive names from branches | `full` | | `worktree_prefix` | Prefix for worktree directories and windows | none | `worktree_naming` strategies: * `full`: Use the full branch name (slashes become dashes) * `basename`: Use only the part after the last `/` (e.g., `prj-123/feature` → `feature`) ### Panes [Section titled “Panes”](#panes) Define your multiplexer pane layout with the `panes` array. For multiple windows in session mode, use [windows](#windows) instead (they are mutually exclusive). ```yaml panes: - command: name: agent focus: true - command: npm run dev name: dev split: horizontal size: 15 ``` Each pane supports: | Option | Description | Default | | ------------ | -------------------------------------------------------------------- | ---------------- | | `name` | Pane display name (currently applied by the Zellij backend) | --- | | `command` | Command to run (see [agent placeholders](#agent-placeholders) below) | Shell | | `focus` | Whether this pane receives focus | `false` | | `zoom` | Zoom pane to fullscreen (implies `focus: true`) | `false` | | `split` | Split direction (`horizontal`, `vertical`, or Zellij-only `stacked`) | --- | | `size` | Absolute size in lines/cells | 50% | | `percentage` | Size as percentage (1-100) | 50% | | `target` | 0-based pane index to split from; defaults to most recent pane | most recent pane | Use `target` when a new pane should split from an earlier pane instead of the one that was just created. This is useful for layouts with two panes across the top and one full-width pane on the bottom. ```yaml panes: - command: nvim focus: true - command: pnpm install && pnpm run dev split: vertical size: 15 - command: split: horizontal target: 0 ``` The example places `nvim` at the top left, the agent to its right, and the dev server across the bottom. `target` must refer to a pane that already exists in the same layout. For example, pane `2` can target `0` or `1`, but not `2` or any later pane. `size` is supported by tmux. Kitty and WezTerm do not provide a fixed-cell split operation. `percentage` is supported by tmux and WezTerm, and by Kitty when using the `splits` layout. `split: stacked` is supported only with the Zellij backend. It creates the pane in a Zellij stack with the previous pane, or with the pane selected by `target`. #### Agent placeholders [Section titled “Agent placeholders”](#agent-placeholders) * ``: resolves to the configured agent (from `agent` config or `--agent` flag) * ``: resolves to a named agent profile from global config Named agent profiles can provide structured `command`, `args`, `env`, and `type` fields, including `env` values loaded with `from_env`. See [named agents](/guide/agents/#named-agents) for the full profile schema. Built-in agents (`claude`, `gemini`, `agy`, `codex`, `copilot`, `opencode`, `kiro-cli`, `vibe`, `pi`, `omp`, `grok`) are auto-detected when used as literal commands and receive prompt injection automatically, without needing the `` placeholder or a matching `agent` config: ```yaml panes: - command: "claude --dangerously-skip-permissions" focus: true - command: "codex --yolo" split: vertical ``` Each agent receives the prompt (via `-p`/`-P`/`-e`) using the correct format for that agent. Auto-detection matches the executable name regardless of flags or path. Antigravity CLI support covers command detection, prompt injection, and status tracking through lifecycle hooks installed by `workmux setup`. ### Named layouts [Section titled “Named layouts”](#named-layouts) Define reusable pane arrangements in the `layouts` map and select one at add-time with `-l/--layout`: ```yaml layouts: design: panes: - command: focus: true - command: split: vertical review: panes: - command: ``` ```bash workmux add my-feature -l design ``` When `-l` is used, the layout’s `panes` replace the top-level `panes` for that worktree. All other config (hooks, files, agent, etc.) comes from the top-level as usual. The `-l` flag cannot be combined with `--agent`. ### Windows [Section titled “Windows”](#windows) When using [session mode](/guide/session-mode/), you can configure multiple windows per session using the `windows` array. This is mutually exclusive with the top-level `panes` config. See [multiple windows per session](/guide/session-mode/#multiple-windows-per-session) for full details. ```yaml mode: session windows: - name: editor panes: - command: focus: true - split: horizontal size: 20 - name: tests panes: - command: just test --watch ``` ### File operations [Section titled “File operations”](#file-operations) New worktrees are clean checkouts with no gitignored files (`.env`, `node_modules`, etc.). Use `files` to automatically copy or symlink what each local worktree needs: ```yaml files: copy: - .env symlink: - .next/cache # Share build cache across worktrees ``` Both `copy` and `symlink` accept glob patterns. Remote workspaces use independent `remote_files.copy` and `remote_files.symlink` lists, with no fallback to `files`. By default, only the Git checkout is transferred. Explicitly select any supplemental files you need remotely: ```yaml remote_files: copy: - .env - CLAUDE.local.md ``` These lists follow the same config-relative path and `""` merge rules as `files`. Remote symlink sources are uploaded once and shared, not synchronized. See [Remote supplemental files](/guide/remote/setup/#supplemental-files) for cache behavior and disabling inherited transfers. To re-apply file operations to existing worktrees (e.g., after updating the config), use [`workmux sync-files`](/reference/commands/sync-files/). ### Lifecycle hooks [Section titled “Lifecycle hooks”](#lifecycle-hooks) Run commands at specific points in the worktree lifecycle, such as installing dependencies or running database migrations. All hooks run with the **worktree directory** as the working directory (or the nested config directory for [nested configs](/guide/monorepos/#nested-configuration)) and receive environment variables: `WM_HANDLE`, `WM_WORKTREE_PATH`, `WM_PROJECT_ROOT`, `WM_CONFIG_DIR`. `hook_shell` is an argv list containing the executable followed by its arguments. Workmux appends each hook command as the final argument. It defaults to `["bash", "-c"]` for compatibility. To select a specific Bash installation on macOS, set the machine-specific path in your global configuration: ```yaml hook_shell: ["/opt/homebrew/bin/bash", "-c"] ``` A project can override the complete `hook_shell` argv in `.workmux.yaml`; when omitted, it inherits the global value. The argv must contain a non-empty executable. Workmux reports the configured executable when it cannot be launched. Shell flags such as error handling or login behavior are applied only when included explicitly in `hook_shell` or the hook command. Remote workspaces run hooks with `bash -c` when `hook_shell` names an absolute path, since that path refers to a local program; see [What the server uses from your config](/guide/remote/setup/#what-the-server-uses-from-your-config). | Hook | When it runs | Additional env vars | | ------------- | ------------------------------------------------- | ------------------------------------ | | `post_create` | After worktree creation, before tmux window opens | - | | `pre_merge` | Before merging (aborts on failure) | `WM_BRANCH_NAME`, `WM_TARGET_BRANCH` | | `pre_remove` | Before worktree removal (aborts on failure) | - | `WM_PROJECT_ROOT` points to the repository’s main worktree, regardless of where the selected config is stored. `WM_CONFIG_DIR` points to the corresponding config directory in the new worktree, which may differ from `WM_WORKTREE_PATH` when using nested configs. Example: ```yaml post_create: - direnv allow pre_merge: - just check ``` In Node.js projects, `pre_remove` defaults to a fast `node_modules` cleanup, and defining your own commands replaces that default. Use `""` to keep it alongside them: ```yaml pre_remove: - cp -r test-results/ "$WM_PROJECT_ROOT/artifacts/$WM_HANDLE/" - "" ``` ### Agent status icons [Section titled “Agent status icons”](#agent-status-icons) Customize the icons shown in tmux window names: ```yaml status_icons: working: "🤖" # Agent is processing waiting: "💬" # Agent needs input (auto-clears on focus) done: "✅" # Agent finished (auto-clears on focus) ``` You can use tmux style codes for colored icons in both the tmux status bar and the dashboard: ```yaml status_icons: done: "#[fg=#a6e3a1]󰄴#[fg=default]" ``` Supported tmux style attributes: `fg=`, `bg=`, `default`. Colors can be hex (`#a6e3a1`), named (`red`, `green`, etc.), or indexed (`colour196`). Set `status_format: false` to disable automatic tmux format modification. ### Auto-name configuration [Section titled “Auto-name configuration”](#auto-name-configuration) Configure LLM-based branch name generation for the `--auto-name` (`-A`) flag: ```yaml auto_name: command: "claude -p" # Use a custom command instead of the inferred default model: "gemini-2.5-flash-lite" background: true system_prompt: "Generate a kebab-case git branch name." ``` The command used for branch name generation is resolved in this order: 1. `auto_name.command` is set: uses that command as-is 2. `agent` is a known agent (`claude`, `gemini`, `agy`, `codex`, `opencode`, `kiro-cli`, `vibe`, `pi`, `omp`): uses the agent’s CLI with a fast/cheap model automatically 3. Neither: falls back to the `llm` CLI (requires installation) To override back to `llm` when an agent is configured, set `auto_name.command: "llm"`. | Option | Description | Default | | --------------- | ---------------------------------------------------------------- | -------------------------- | | `command` | Command for branch name generation (overrides agent profile) | Agent profile or `llm` CLI | | `model` | LLM model to use with the `llm` CLI (ignored when `command` set) | `llm`’s default | | `background` | Always run in background when using `--auto-name` | `false` | | `system_prompt` | Custom system prompt for branch name generation | Built-in prompt | See [`workmux add --auto-name`](/reference/commands/add/#automatic-branch-name-generation) for usage details. ## Default behavior [Section titled “Default behavior”](#default-behavior) * Worktrees are created in `__worktrees` as a sibling directory to your project by default * If no `panes` configuration is defined, workmux provides opinionated defaults: * For projects with a `CLAUDE.md` file: Opens the configured agent (see `agent` option) in the first pane, defaulting to `claude` if none is set. * For all other projects: Opens your default shell. * Both configurations include a second pane split horizontally * `post_create` commands are optional and only run if you configure them ## Automatic setup with panes [Section titled “Automatic setup with panes”](#automatic-setup-with-panes) Use the `panes` configuration to automate environment setup. Unlike `post_create` hooks which must finish before the tmux window opens, pane commands execute immediately *within* the new window. This can be used for: * **Installing dependencies**: Run `npm install` or `cargo build` in a focused pane to monitor progress. * **Starting services**: Launch dev servers, database containers, or file watchers automatically. * **Running agents**: Initialize AI agents with specific context. Since these run in standard tmux panes, you can interact with them (check logs, restart servers) just like a normal terminal session. Tip Running dependency installation (like `pnpm install`) in a pane command rather than `post_create` has a key advantage: you get immediate access to the tmux window while installation runs in the background. With `post_create`, you’d have to wait for the install to complete before the window even opens. This also means AI agents can start working immediately in their pane while dependencies install in parallel. ```yaml panes: # Pane 1: Install dependencies, then start dev server - command: pnpm install && pnpm run dev # Pane 2: AI agent - command: split: horizontal focus: true ``` # Dashboard > A TUI for monitoring agents, reviewing changes, staging hunks, and sending commands When running agents in multiple worktrees across many projects, it’s helpful to have a centralized view of what each agent is doing. The dashboard provides a TUI for monitoring agents, reviewing their changes, staging hunks, and sending commands. Optional feature The dashboard is entirely optional. It becomes especially useful when running multiple agents across several projects, but workmux’s core workflow works great on its own. ![workmux dashboard](/_astro/dashboard.DLLfesKM_Z1dx9vq.webp) For an always-visible, non-intrusive alternative, see the [sidebar](/guide/sidebar/). ## Setup [Section titled “Setup”](#setup) Prerequisites The dashboard requires [status tracking hooks](/guide/status-tracking/) to be configured. Without them, no agents will appear. Add this binding to your `~/.tmux.conf`: ```bash bind C-s display-popup -h 30 -w 100 -E "workmux dashboard" ``` Then press `prefix + Ctrl-s` to open the dashboard as a tmux popup. Feel free to adjust the keybinding and popup dimensions (`-h` and `-w`) as needed. Quick access Consider binding the dashboard to a key you can press without the tmux prefix, such as `Cmd+E` or `Ctrl+E` in your terminal emulator. This makes it easy to check on your agents at any time. See [command reference](/reference/commands/dashboard/) for CLI options. ## Views [Section titled “Views”](#views) The dashboard has two views, toggled with `Tab`: * **Agents**: Shows all running agent panes with their status, git info, GitHub branch checks, and live terminal preview * **Worktrees**: Shows all git worktrees with branch, PR status, GitHub branch checks, and agent summary. Press `r` to remove a worktree (kills agent, removes worktree, deletes branch). ## Keybindings (Agents view) [Section titled “Keybindings (Agents view)”](#keybindings-agents-view) | Key | Action | | -------- | ------------------------------------- | | `1`-`9` | Quick jump to agent | | `Tab` | Switch to worktree view | | `Bksp` | Toggle between current and last agent | | `d` | View diff (opens WIP view) | | `o` | Open PR in browser | | `O` | Open PR checks in browser | | `p` | Peek at agent (dashboard stays open) | | `s` | Cycle sort mode | | `F` | Toggle session filter | | `f` | Toggle stale filter (show/hide stale) | | `i` | Enter input mode (type to agent) | | `X` | Kill selected agent | | `R` | Sweep (bulk remove merged/gone) | | `Ctrl+u` | Scroll preview up | | `Ctrl+d` | Scroll preview down | | `+`/`-` | Resize preview pane | | `Enter` | Go to selected agent | | `/` | Filter agents by name | | `j`/`k` | Navigate up/down | | `T` | Cycle theme | | `:` | Open command palette | | `q` | Quit | | `Ctrl+c` | Quit (works from any view) | Agent jumps close the dashboard by default. See [`close_on_jump`](/guide/dashboard/configuration/#staying-open-after-a-jump) to keep it open. ## Keybindings (Worktrees view) [Section titled “Keybindings (Worktrees view)”](#keybindings-worktrees-view) | Key | Action | | -------- | -------------------------------------- | | `1`-`9` | Quick jump to worktree index | | `Tab` | Switch to agents view | | `Enter` | Jump to worktree (agent or mux window) | | `o` | Open PR in browser | | `O` | Open PR checks in browser | | `a` | Add worktree | | `r` | Remove worktree | | `c` | Close mux window (keeps worktree) | | `R` | Sweep (bulk remove merged/gone) | | `s` | Cycle sort mode | | `p` | Switch project | | `/` | Filter worktrees by name/branch | | `j`/`k` | Navigate up/down | | `T` | Cycle theme | | `:` | Open command palette | | `q` | Quit | | `Ctrl+c` | Quit (works from any view) | Worktree jumps follow the [`close_on_jump`](/guide/dashboard/configuration/#staying-open-after-a-jump) setting. ## Mouse controls [Section titled “Mouse controls”](#mouse-controls) The dashboard captures mouse input while it is open. Click the **Agents** and **Worktrees** tabs to switch views, click a table row to select it, and double-click a row to jump to its agent or worktree. Right-click a row to open its action menu, then click an action or use `j`/`k` and `Enter`. Click a footer command to run it. Use the mouse wheel over a table to change the selection without wrapping, or over the live preview to scroll its output. In diff view, use the wheel to scroll and click a file in the sidebar to jump to its diff. Visible diff and patch footer commands are clickable. Mouse capture is released when the dashboard exits. ## Columns [Section titled “Columns”](#columns) * **#** (`number`): Quick jump key (1-9) * **Project** (`project`): Project name (from `__worktrees` path or directory name) * **Worktree** (`worktree`): Worktree/window name * **Machine** (`machine`): Remote server name, or `local`, shown once a remote agent is listed * **Git** (`git`): Diff stats showing branch changes (dim) and uncommitted changes (bright) * **PR** (`pr`): Pull request number and check status, shown once an agent has one * **PR Title** (`pr_title`): Pull request title (opt-in) * **PR Issues** (`pr_issues`): GitHub closing issue references (opt-in) * **Win** (`window`): Multiplexer window index, blank when the backend does not expose one * **Status** (`status`): Agent status icon (🤖 working, 💬 waiting, ✅ done, or “stale”) * **Time** (`time`): Time since last status change * **Title** (`title`): Claude Code session title (auto-generated summary) Every column of the agents table can be reordered, or left out, with the [`agent_columns`](/guide/dashboard/configuration/#columns) option, using the names in parentheses above. The Worktrees tab has a separate [`worktree_columns`](/guide/dashboard/configuration/#worktree-columns) option for its columns, including Mux, Age, and Agent. ## Live preview [Section titled “Live preview”](#live-preview) The bottom half of the dashboard shows a live preview of the selected agent’s terminal output. The preview auto-scrolls to show the latest output, but you can scroll through history with `Ctrl+u`/`Ctrl+d`. ## Input mode [Section titled “Input mode”](#input-mode) Press `i` to enter input mode, which forwards your keystrokes and pasted text directly to the selected agent’s pane. This lets you respond to agent prompts without leaving the dashboard. Press `Esc` to exit input mode and return to normal navigation. To use a different exit key and forward `Esc` to the agent, set [`dashboard.input_exit_key`](/guide/dashboard/configuration/#input-mode-exit-key), for example to `Ctrl+q`. ## Sort modes [Section titled “Sort modes”](#sort-modes) Press `s` to cycle through sort modes: * **Priority** (default): Waiting > Done > Working > Stale * **Project**: Group by project name, then by priority within each project * **Recency**: Most recently updated first * **Natural**: Original tmux order (by pane creation) Your sort preference persists across dashboard sessions. To change the default used when no preference has been persisted yet, set `dashboard.sort_mode` in your config: ```yaml dashboard: sort_mode: recency # priority (default), project, recency, natural ``` ## Session filter [Section titled “Session filter”](#session-filter) Press `F` to toggle the session filter. When active, only agents in the current session are shown. This is useful for session-per-project workflows where each session maps to a repository. You can also start the dashboard with `--session` to default to session filtering. The preference persists across sessions. ## Stale filter [Section titled “Stale filter”](#stale-filter) Press `f` to toggle between showing all agents or hiding stale ones. The filter state persists across dashboard sessions within the same tmux server. ## Sweep [Section titled “Sweep”](#sweep) Press `R` in either view to open sweep mode, which identifies worktrees ready for cleanup and lets you remove them in bulk. Worktrees are flagged based on these conditions: * **PR merged**: The associated pull request has been merged * **PR closed**: The pull request was closed without merging * **Upstream gone**: The remote branch has been deleted * **Merged locally**: The branch is fully merged into the main branch with no upstream tracking The main worktree is never included. Clean worktrees are pre-selected and can be toggled with `Space`. Dirty worktrees (uncommitted changes) are shown greyed out and cannot be selected. Press `Enter` to remove all selected worktrees, or `Esc` to cancel. # Configuration > Customize dashboard commands and layout The dashboard can be customized in your `.workmux.yaml`: ```yaml dashboard: commit: "Commit staged changes with a descriptive message" merge: "!workmux merge" layout: stacked preview_size: 60 agent_columns: [number, project, worktree, git, pr, window, status, time, title] worktree_columns: [number, project, worktree, git, pr, mux, age, agent] close_on_jump: true input_exit_key: Esc ``` The `commit` and `merge` values are text sent to the agent’s pane. Use the `!` prefix to run shell commands (supported by Claude, Gemini, and other agents). ## Defaults [Section titled “Defaults”](#defaults) | Option | Default value | Description | | ------------------ | -------------------------------------------------------------------- | ----------------------------------------------------------------------------- | | `commit` | `Commit staged changes with a descriptive message` | Natural language prompt | | `merge` | `!workmux merge` | Shell command via agent | | `layout` | `stacked` | `stacked` (table above preview) or `side_by_side` (preview left, table right) | | `preview_size` | `60` | Preview height or width as percentage (10-90) | | `agent_columns` | `[number, project, worktree, machine, git, pr, status, time, title]` | Agents table columns, in display order | | `worktree_columns` | `[number, project, worktree, git, pr, mux, age, agent]` | Worktree table columns, in display order | | `close_on_jump` | `true` | Close the dashboard after a jump | | `input_exit_key` | `Esc` | Key to exit input mode (`Esc` or `Ctrl+`) | ## Input mode exit key [Section titled “Input mode exit key”](#input-mode-exit-key) `input_exit_key` accepts `Esc` (the default) or `Ctrl+` (`a`–`z`), case-insensitively. For example, to exit input mode with `Ctrl+q` and send `Esc` to the agent: ```yaml dashboard: input_exit_key: Ctrl+q ``` The exit key is consumed by the dashboard, not sent to the agent. Escape bindings in other dashboard modes are unchanged. Project configuration overrides the global setting. Choose a key your terminal delivers distinctly. Some Ctrl-letter keys are indistinguishable from Tab, Enter, or Backspace, and terminal flow control can intercept `Ctrl+q` or `Ctrl+s`. ## Staying open after a jump [Section titled “Staying open after a jump”](#staying-open-after-a-jump) Jumping to an agent or worktree closes the dashboard. This includes `Enter`, `1`-`9`, `Bksp`, command-palette jumps, and double-clicking a row. Set `close_on_jump: false` to keep the dashboard open while moving between agents and worktrees: ```yaml dashboard: close_on_jump: false ``` The jump still updates the pane history used by `Bksp`. The `p` peek action always keeps the dashboard open and does not update pane history. Multiplexers such as Zellij that keep the dashboard open after jumps retain that behavior regardless of this setting. ## Columns [Section titled “Columns”](#columns) `agent_columns` sets which columns the agents table shows and in what order. For example, to read the title first and keep the elapsed time out of the way: ```yaml dashboard: agent_columns: [number, window, status, title, project, worktree, git, pr, time] ``` | Column | Content | | ----------- | ------------------------------------------------ | | `number` | Jump key of the row, shown under the `#` header | | `project` | Project name | | `worktree` | Worktree name, with a pane number when it splits | | `machine` | Remote server the agent runs on, or `local` | | `git` | Branch state, staged and unstaged changes | | `pr` | Pull request number and check status | | `pr_title` | Pull request title | | `pr_issues` | Issues closed by the pull request | | `window` | Multiplexer window index | | `status` | Agent status icons | | `time` | Time since the last status change | | `title` | Agent session title | | `prompt` | Latest prompt you sent to the agent | A column left out of the list is not rendered, so `agent_columns: [worktree, status, title]` gives a table of just those three. Repeating a column has no effect, and an empty list falls back to the default order. Dropping `number` hides the jump key, and `1`-`9` still jump to the first nine rows. The `pr` column appears only while at least one agent has a pull request or checks to report, wherever it is placed in the list. Likewise, `machine` appears only while the table lists at least one [remote agent](/guide/remote/), showing the remote’s name from `remotes:` and `local` for agents on this machine. The opt-in `pr_title` and `pr_issues` columns stay visible and leave the cell blank when the branch has no pull request or closing issues. `pr_issues` uses GitHub’s closing issue references, not arbitrary issue mentions in pull request text. Same-repository issues appear as `#123`; cross-repository issues include the repository, such as `owner/repo#123`. The opt-in `window` column shows the tmux window index used by `prefix + `; backends without window indexes leave the cell blank. A trailing `title`, `prompt`, `pr_title`, or `pr_issues` takes the width left over by the other columns; anywhere else it sizes to its content, and the leftover width sits at the right edge of the table. #### Prompt column [Section titled “Prompt column”](#prompt-column) The opt-in `prompt` column shows the last prompt you sent to each agent, on one line and cut with `…` to fit. Status hooks store the prompt only while the `prompt` column or a [`{prompt}` sidebar token](/guide/sidebar/customization/#tokens) is configured, evaluated with the agent’s project configuration. Removing both stops capture, and each agent’s stored prompt is deleted at its next status update. Prompts come from Claude Code, Codex, Gemini CLI, Copilot CLI, Grok, OpenCode, pi, and oh-my-pi. Prompts sent to subagents and messages the agent injects itself are ignored. A prompt with no text, such as an image alone, keeps the previous prompt. A prompt passed when the agent starts, such as `workmux add -p`, may not be shown until you send the next one. OpenCode, pi, and oh-my-pi report prompts once `workmux setup` updates their status plugin. ### Worktree columns [Section titled “Worktree columns”](#worktree-columns) `worktree_columns` controls the Worktrees tab independently of `agent_columns`. To hide Git status and give the other columns more room: ```yaml dashboard: worktree_columns: [number, project, worktree, pr, mux, age, agent] ``` | Column | Content | | ----------- | ----------------------------------------------- | | `number` | Jump key of the row, shown under the `#` header | | `project` | Project name | | `worktree` | Worktree name, with the branch when different | | `git` | Branch state and uncommitted changes | | `pr` | Pull request number and check status | | `pr_title` | Pull request title | | `pr_issues` | Issues closed by the pull request | | `mux` | Whether a multiplexer window is open | | `age` | Time since worktree creation | | `agent` | Agent status summary | The list sets display order; omitted columns are hidden and duplicates are ignored. An absent or empty list uses the default order. Project configuration overrides the global list, and an explicit empty project list resets it to defaults. A trailing `agent`, `pr_title`, or `pr_issues` fills the remaining width. Elsewhere it sizes to its content, leaving extra space at the right edge. The `pr` column is hidden until a worktree has a pull request or checks, except when it is the only configured column: like the agents table, it stays visible to avoid an empty table. The opt-in PR metadata columns use the same closing-reference and blank-cell behavior as the Agents table. Hiding `number` does not disable `1`-`9` jumps. Hiding `git` does not disable Git status updates or remove the selected worktree’s Git details from the preview. ## Layout [Section titled “Layout”](#layout) The default `stacked` layout places the table above the preview. To give the preview the full content height, with the table on the right: ```yaml dashboard: layout: side_by_side ``` The layout applies to both the Agents and Worktrees tabs. The tab header and footer remain above and below the content. Backends without preview support show only the table regardless of this setting. Side-by-side leaves less width for each pane. On narrow terminals, use the stacked layout or reduce the table’s configured columns. Captured agent output is clipped to the preview width, not rewrapped. ## Preview size [Section titled “Preview size”](#preview-size) The `preview_size` option controls the preview as a percentage of the content area: height in `stacked` layout, width in `side_by_side` layout. A higher value means more space for the preview and less for the table. You can also adjust the preview size interactively with `+`/`-` keys. These adjustments persist across dashboard sessions in the workmux state directory. The CLI flag `--preview-size` (`-P`) overrides both the config and saved preference for that session. ## Examples [Section titled “Examples”](#examples) ```yaml # Use Claude skill for merge (see skills guide) dashboard: merge: "/merge" # Custom shell commands dashboard: merge: "!workmux merge --rebase --notification" # Natural language prompts dashboard: commit: "Create a commit with a conventional commit message" merge: "Rebase onto main and run workmux merge" ``` ## Using skills [Section titled “Using skills”](#using-skills) For complex workflows, [skills](/guide/skills/) are more powerful than simple prompts or shell commands. A skill can encode detailed, multi-step instructions that the agent follows intelligently. ```yaml dashboard: merge: "/merge" ``` See the [skills guide](/guide/skills/) for the `/merge` skill you can copy. # Diff view > View uncommitted or branch changes for each agent Press `d` to view the diff for the selected agent. The diff view has two modes: * **WIP** - Shows uncommitted changes (`git diff HEAD`) * **review** - Shows all changes on the branch vs main (`git diff main...HEAD`) Press `Tab` while in diff view to toggle between modes. The footer displays which mode is active along with diff statistics showing lines added (+) and removed (-). When [delta](https://github.com/dandavison/delta) is installed, diffs are rendered with syntax highlighting for better readability. Without delta, basic diff coloring is used as a fallback. ![workmux diff view](/_astro/diff-view.BO_DnWr-_odcGD.webp) Diff view showing WIP changes across multiple files If there are no changes to show, a message is displayed instead: * WIP mode: “No uncommitted changes” * Review mode: “No commits on this branch yet” ## Keybindings [Section titled “Keybindings”](#keybindings) | Key | Action | | --------- | --------------------------- | | `Tab` | Toggle WIP / review | | `a` | Enter patch mode (WIP only) | | `j`/`k` | Scroll down/up | | `Ctrl+d` | Page down | | `Ctrl+u` | Page up | | `c` | Send commit action to agent | | `m` | Send merge action to agent | | `:` | Open command palette | | `q`/`Esc` | Close diff view | | `Ctrl+c` | Quit dashboard | The `c` and `m` actions can be [configured](/guide/dashboard/configuration/) to run custom commands or prompts. # Patch mode > Selectively stage individual hunks like git add -p Patch mode (`a` from WIP diff) allows staging individual hunks like `git add -p`. This is useful for selectively staging parts of an agent’s work. When [delta](https://github.com/dandavison/delta) is installed, hunks are rendered with syntax highlighting for better readability. ## Keybindings [Section titled “Keybindings”](#keybindings) | Key | Action | | --------- | -------------------------------- | | `y` | Stage current hunk | | `n` | Skip current hunk | | `u` | Undo last staged hunk | | `s` | Split hunk (if splittable) | | `o` | Comment on hunk (sends to agent) | | `j`/`k` | Navigate to next/previous hunk | | `:` | Open command palette | | `q`/`Esc` | Exit patch mode | | `Ctrl+c` | Quit dashboard | ## Staging hunks [Section titled “Staging hunks”](#staging-hunks) Press `y` to stage the current hunk (adds it to the git index) and advance to the next. Press `n` to skip without staging. The counter in the header shows your progress through all hunks (e.g., `[3/10]`). After staging or skipping all hunks, the diff refreshes to show any remaining unstaged changes. ## Splitting hunks [Section titled “Splitting hunks”](#splitting-hunks) Press `s` to split the current hunk into smaller pieces. This works when there are context lines (unchanged lines) between separate changes within a hunk. If the hunk cannot be split further, nothing happens. ## Undo [Section titled “Undo”](#undo) Press `u` to undo the last staged hunk. This uses `git apply --cached --reverse` to unstage it. You can undo multiple times to unstage several hunks. ## Commenting on hunks [Section titled “Commenting on hunks”](#commenting-on-hunks) Press `o` to enter comment mode. Type your message and press `Enter` to send it to the agent. The comment includes: * File path and line number * The diff hunk as context (in a code block) * Your comment text Press `Esc` to cancel without sending. This is useful for giving the agent feedback about specific changes, like “This function should handle the error case” or “Can you add a test for this?” # direnv integration > Automatically set up direnv in new worktrees If your project uses [direnv](https://direnv.net/) for environment management, you can configure workmux to automatically set it up in new worktrees: .workmux.yaml ```yaml post_create: - direnv allow files: symlink: - .envrc ``` See also [Using direnv for port isolation](/guide/monorepos/#using-direnv) in monorepos. # Git worktree caveats > Common git worktree pitfalls and how workmux handles them While powerful, git worktrees have nuances that are important to understand. workmux is designed to automate solutions to these, but awareness of the underlying mechanics helps. ## Gitignored files require configuration [Section titled “Gitignored files require configuration”](#gitignored-files-require-configuration) When `git worktree add` creates a new working directory, it’s a clean checkout. Files listed in your `.gitignore` (e.g., `.env` files, `node_modules`, IDE configuration) will not exist in the new worktree by default. Your application will be broken in the new worktree until you manually create or link these necessary files. This is a primary feature of workmux. Use the `files` section in your `.workmux.yaml` to automatically copy or symlink these files on creation: .workmux.yaml ```yaml files: copy: - .env # Copy environment variables symlink: - .next/cache # Share Next.js build cache ``` Caution Symlinking `node_modules` can be efficient but only works if all worktrees share identical dependencies. If different branches have different dependency versions, each worktree needs its own installation. For dependency installation, consider using a pane command instead of `post_create` hooks - this runs the install in the background without blocking the worktree and window creation: ```yaml panes: - command: npm install focus: true - split: horizontal ``` ## Conflicts [Section titled “Conflicts”](#conflicts) Worktrees isolate your filesystem, but they do not prevent merge conflicts. If you modify the same area of code on two different branches (in two different worktrees), you will still have a conflict when you merge one into the other. The best practice is to work on logically separate features in parallel worktrees. When conflicts are unavoidable, use standard git tools to resolve them. You can also leverage an AI agent within the worktree to assist with the conflict resolution. ## Package manager considerations (pnpm, yarn) [Section titled “Package manager considerations (pnpm, yarn)”](#package-manager-considerations-pnpm-yarn) Modern package managers like `pnpm` use a global store with symlinks to `node_modules`. Each worktree typically needs its own `pnpm install` to set up the correct dependency versions for that branch. If your worktrees always have identical dependencies (e.g., working on multiple features from the same base), you could potentially symlink `node_modules` between worktrees. However, this breaks as soon as branches diverge in their dependencies, so it’s generally safer to run a fresh install in each worktree. Note In large monorepos, cleaning up `node_modules` during worktree removal can take significant time. workmux has a [special cleanup mechanism](https://github.com/raine/workmux/blob/main/src/scripts/cleanup_node_modules.sh) that moves `node_modules` to a temporary location and deletes it in the background, making the `remove` command return almost instantly. It is enabled automatically when a lockfile (`pnpm-lock.yaml`, `package-lock.json`, or `yarn.lock`) exists at the project root or in a direct subdirectory. You can also request it explicitly with `""` in `pre_remove`. ## Rust projects [Section titled “Rust projects”](#rust-projects) Rust’s `target/` directory should **not** be symlinked between worktrees. Cargo locks the `target` directory during builds, so sharing it would block parallel builds and defeat the purpose of worktrees. Instead, use [sccache](https://github.com/mozilla/sccache) to share compiled dependencies across worktrees: ```bash brew install sccache ``` Add to `~/.cargo/config.toml`: ```toml [build] rustc-wrapper = "sccache" ``` This caches compiled dependencies globally, so new worktrees benefit from cached artifacts without any lock contention. ## Symlinks and `.gitignore` trailing slashes [Section titled “Symlinks and .gitignore trailing slashes”](#symlinks-and-gitignore-trailing-slashes) If your `.gitignore` uses a trailing slash to ignore directories (e.g., `tests/venv/`), symlinks to that path in the created worktree will **not** be ignored and will show up in `git status`. This is because `venv/` only matches directories, not files (symlinks). To ignore both directories and symlinks, remove the trailing slash: ```diff tests/venv/ tests/venv ``` # Installation > Install workmux via Homebrew, pre-built binaries, Cargo, mise, or Nix ## Bash YOLO [Section titled “Bash YOLO”](#bash-yolo) ```bash curl -fsSL https://raw.githubusercontent.com/raine/workmux/main/scripts/install.sh | bash ``` ## Homebrew (macOS/Linux) [Section titled “Homebrew (macOS/Linux)”](#homebrew-macoslinux) ```bash brew install raine/workmux/workmux ``` ## Other methods [Section titled “Other methods”](#other-methods) ### Cargo [Section titled “Cargo”](#cargo) Requires Rust. Install via [rustup](https://rustup.rs/) if you don’t have it. ```bash cargo install workmux ``` ### mise [Section titled “mise”](#mise) ```bash mise use -g cargo:raine/workmux ``` ### Nix [Section titled “Nix”](#nix) Requires [Nix with flakes enabled](https://nixos.wiki/wiki/Flakes). ```bash nix profile install github:raine/workmux ``` Or try without installing: ```bash nix run github:raine/workmux -- --help ``` See [Nix guide](/guide/nix/) for flake integration and home-manager setup. *** For manual installation, see [pre-built binaries](https://github.com/raine/workmux/releases/latest). ## Shell alias (recommended) [Section titled “Shell alias (recommended)”](#shell-alias-recommended) For faster typing, alias `workmux` to `wm`: ```bash alias wm='workmux' ``` Add this to your `.bashrc`, `.zshrc`, or equivalent shell configuration file. ## Shell completions [Section titled “Shell completions”](#shell-completions) To enable tab completions for commands and branch names, add the following to your shell’s configuration file. * Bash ```bash # Add to ~/.bashrc eval "$(workmux completions bash)" ``` * Zsh ```bash # Add to ~/.zshrc eval "$(workmux completions zsh)" ``` * Fish ```bash # Add to ~/.config/fish/config.fish workmux completions fish | source ``` ## Uninstalling [Section titled “Uninstalling”](#uninstalling) ### Automatic (recommended) [Section titled “Automatic (recommended)”](#automatic-recommended) Run the uninstall script: ```bash curl -fsSL https://raw.githubusercontent.com/raine/workmux/main/scripts/uninstall.sh | bash ``` If installed via [Homebrew](#homebrew-macoslinux), also run: ```bash brew uninstall workmux brew untap raine/workmux ``` If installed via [Cargo](#cargo), also run: ```bash cargo uninstall workmux ``` ### Manual [Section titled “Manual”](#manual) 1. Remove hooks, skills, cache and state by running the uninstall script, or delete workmux data directly: `rm -rf ~/.cache/workmux ~/.local/state/workmux` 2. Remove the binary from `/usr/local/bin`, `~/.local/bin`, or `~/.cargo/bin` 3. Optionally remove config: `rm -rf ~/.config/workmux` 4. Remove shell completions and `alias wm=workmux` from your shell config 5. Clean up worktrees with `git worktree list` / `git worktree remove` # Kitty > Use kitty as an alternative multiplexer backend Experimental The kitty backend is new and experimental. Expect rough edges and potential issues. [kitty](https://sw.kovidgoyal.net/kitty/) can be used as an alternative to tmux. Detected automatically via `$KITTY_WINDOW_ID`. ![workmux running in kitty with multiple agents](/_astro/kitty-screenshot.IwN7L6Q7_Z1KXjaX.webp) ## Differences from tmux [Section titled “Differences from tmux”](#differences-from-tmux) | Feature | tmux | kitty | | -------------------- | -------------------- | ------------------------ | | Agent status in tabs | Yes (window names) | Yes (custom tab title) | | Pane sizing | Percentage or cells | Percentage with `splits` | | Tab ordering | Insert after current | Appends to end | | Scope | tmux session | OS window | * **Tab ordering**: New tabs appear at the end of the tab bar (no “insert after” support like tmux) * **OS window isolation**: workmux operates within the current OS window. Tabs in other OS windows are not affected. * **Pane sizing**: `percentage` uses Kitty’s split bias with the `splits` layout. Absolute `size` values are unsupported because Kitty does not provide fixed-cell splits. * **Terminology note**: What workmux calls a “pane” is called a “window” in kitty, and what workmux calls a “window” (tab) is called a “tab” in kitty ## Requirements [Section titled “Requirements”](#requirements) * kitty with remote control enabled (`kitten @` must work) * Unix-like OS (named pipes for handshakes) * Windows is **not supported** * **Required kitty configuration** (see below) ## Required kitty configuration [Section titled “Required kitty configuration”](#required-kitty-configuration) workmux relies on kitty’s remote control API. Add these settings to your `kitty.conf`: ```bash # REQUIRED: Enable remote control allow_remote_control yes # REQUIRED: Set up socket for remote control # The socket path can be customized, but using kitty_pid ensures uniqueness listen_on unix:/tmp/kitty-{kitty_pid} # RECOMMENDED: Enable splits layout for pane splitting enabled_layouts splits,stack ``` ## Agent status display [Section titled “Agent status display”](#agent-status-display) workmux stores agent status in kitty [user variables](https://sw.kovidgoyal.net/kitty/remote-control/#kitten-set-user-vars) (`workmux_status`), which can be displayed in tab titles using kitty’s `{custom}` template placeholder. Agent setup Copy this page as markdown and paste it to your coding agent to have it set up the configuration files for you. ### Setup [Section titled “Setup”](#setup) 1. Create `~/.config/kitty/tab_bar.py`: ```python from kitty.fast_data_types import get_boss def draw_title(data): tab = get_boss().tab_for_id(data['tab'].tab_id) if tab: for window in tab: status = window.user_vars.get('workmux_status', '') if status: return ' ' + status return '' ``` 2. Create `~/.config/kitty/workmux_watcher.py` for live status updates and auto-clear on focus: ```python from kitty.boss import Boss from kitty.window import Window def on_focus_change(boss: Boss, window: Window, data: dict) -> None: if not data.get('focused'): return if window.user_vars.get('workmux_auto_clear') == '1': boss.call_remote_control(window, ( 'set-user-vars', f'--match=id:{window.id}', 'workmux_status=', 'workmux_auto_clear=', )) def on_set_user_var(boss: Boss, window: Window, data: dict) -> None: if data.get('key') == 'workmux_status': tm = boss.os_window_map.get(window.os_window_id) if tm is not None: tm.update_tab_bar_data() tm.mark_tab_bar_dirty() ``` 3. Add to your `kitty.conf`: ```bash tab_title_template "{title}{custom}" watcher workmux_watcher.py ``` The `{custom}` placeholder calls the `draw_title` function, which checks each window in the tab for a `workmux_status` user variable and appends it to the title. The watcher refreshes the tab bar when status changes and auto-clears “waiting” and “done” statuses when the tab receives focus. ## Known limitations [Section titled “Known limitations”](#known-limitations) * Windows is not supported (requires Unix-specific features) * Agent status icons require a small config change (see above) * Cross-OS-window operations are not supported * Some edge cases may not be as thoroughly tested as the tmux backend * Tab insertion ordering is not supported (new tabs always appear at the end) # Monorepos > Per-project configs and port isolation for monorepos with multiple services Tips for using workmux with monorepos containing multiple services. ## Nested configuration [Section titled “Nested configuration”](#nested-configuration) Place a `.workmux.yaml` in any subdirectory to configure that project independently. When you run workmux from a subdirectory, it walks upward to find the nearest config: ```plaintext monorepo/ ├── .workmux.yaml # Root config (used from monorepo/) ├── backend/ │ ├── .workmux.yaml # Backend config (used from backend/) │ └── src/ └── frontend/ ├── .workmux.yaml # Frontend config (used from frontend/) └── src/ ``` ```bash cd monorepo/backend workmux add api-feature # Uses backend/.workmux.yaml ``` When using a nested config: * **Working directory**: The tmux window opens in the subdirectory (e.g., `backend/`) within the new worktree, not the worktree root * **File operations**: `files.copy` and `files.symlink` paths are relative to the config directory * **Hooks**: Run with the subdirectory as the working directory ### Example nested config [Section titled “Example nested config”](#example-nested-config) backend/.workmux.yaml ```yaml agent: claude files: copy: - .env # Copies backend/.env to worktree's backend/.env post_create: - cargo build # Runs in worktree's backend/ directory ``` ### Environment variables [Section titled “Environment variables”](#environment-variables) Hooks receive `WM_CONFIG_DIR` pointing to the config directory in the new worktree: backend/.workmux.yaml ```yaml post_create: - echo "Project root: $WM_PROJECT_ROOT" # /path/to/main-worktree - echo "Config dir: $WM_CONFIG_DIR" # /path/to/worktree/backend - echo "Worktree root: $WM_WORKTREE_PATH" # /path/to/worktree ``` ### No inheritance [Section titled “No inheritance”](#no-inheritance) Nested configs completely replace the root config - they are not merged. If you need shared settings across projects, use the global config (`~/.config/workmux/config.yaml`) with the `` placeholder. ## Port isolation [Section titled “Port isolation”](#port-isolation) When running multiple services (API, web app, database) in a monorepo, each worktree needs unique ports to avoid conflicts. For example, if your `.env` has hardcoded ports like `API_PORT=3001` and `VITE_PORT=3000`, running two worktrees simultaneously would fail because both would try to bind to the same ports. One strategy is to generate a `.env.local` file with unique ports for each worktree. Many frameworks (Vite, Next.js, CRA) automatically load `.env.local` and merge it with `.env`, with `.env.local` taking precedence. ### Example [Section titled “Example”](#example) Create a script at `scripts/worktree-env`: ```bash #!/usr/bin/env bash set -euo pipefail port_in_use() { lsof -nP -iTCP:"$1" -sTCP:LISTEN &>/dev/null } find_port() { local port=$1 while port_in_use "$port"; do ((port++)) done echo "$port" } # Hash the handle to get a deterministic port offset (0-99) hash=$(echo -n "$WM_HANDLE" | md5 | cut -c1-4) offset=$((16#$hash % 100)) # Find available ports starting from the hash-based offset api_port=$(find_port $((3001 + offset * 10))) vite_port=$(find_port $((3000 + offset * 10))) # Generate .env.local with port overrides cat >.env.local < Installing and configuring workmux with Nix and Home Manager Requires [Nix with flakes enabled](https://nixos.wiki/wiki/Flakes). ## Quick start [Section titled “Quick start”](#quick-start) Run workmux without installing: ```bash nix run github:raine/workmux -- --help ``` ## Flake input [Section titled “Flake input”](#flake-input) ```nix inputs.workmux.url = "github:raine/workmux"; ``` ## Installation [Section titled “Installation”](#installation) ### Home Manager [Section titled “Home Manager”](#home-manager) Install the package and write the config file directly: ```nix { inputs, pkgs, ... }: { home.packages = [ inputs.workmux.packages.${pkgs.system}.default ]; xdg.configFile."workmux/config.yaml".text = '' merge_strategy: rebase agent: claude panes: - command: focus: true - split: horizontal ''; } ``` See [Configuration](/guide/configuration/) for all config options. ### NixOS [Section titled “NixOS”](#nixos) ```nix { inputs, pkgs, ... }: { environment.systemPackages = [ inputs.workmux.packages.${pkgs.system}.default ]; } ``` ## Shell completions [Section titled “Shell completions”](#shell-completions) The flake automatically installs completions for Bash, Zsh, and Fish. Do not add the manual `eval "$(workmux completions ...)"` lines from the [Installation](/guide/installation/#shell-completions) guide. # Quick start > Get started with workmux in minutes Prerequisites workmux requires a terminal multiplexer. Make sure you have [tmux](https://github.com/tmux/tmux) (or [WezTerm](/guide/wezterm/) / [Kitty](/guide/kitty/) / [Zellij](/guide/zellij/)) installed and running before you start. See [My tmux setup](https://raine.dev/blog/my-tmux-setup/) if you need a starting point. ## 1. Install [Section titled “1. Install”](#1-install) ```bash curl -fsSL https://raw.githubusercontent.com/raine/workmux/main/scripts/install.sh | bash ``` See [Installation](/guide/installation/) for other methods (Homebrew, Cargo, Nix). ## 2. Initialize configuration (optional) [Section titled “2. Initialize configuration (optional)”](#2-initialize-configuration-optional) ```bash workmux init ``` This creates a `.workmux.yaml` file to customize your workflow (pane layouts, setup commands, file operations, etc.). workmux works out of the box with sensible defaults, so this step is optional. ## 3. Create a new worktree and tmux window [Section titled “3. Create a new worktree and tmux window”](#3-create-a-new-worktree-and-tmux-window) ```bash workmux add new-feature ``` This will: * Create a git worktree at `/../__worktrees/new-feature` * Copy config files and symlink dependencies (if [configured](/guide/configuration/#file-operations)) * Run any [`post_create`](/guide/configuration/#lifecycle-hooks) setup commands * Create a tmux window named `wm-new-feature` (the prefix is configurable) * Set up your configured or the default tmux pane layout * Automatically switch your tmux client to the new window Tip **Highly recommended workflow**: If you’re already in an agent session, use the [`/worktree` skill](/guide/skills/#worktree) instead of writing `workmux add` commands yourself: ```text > /worktree Add pagination to the users endpoint > /worktree Fix it ``` The agent writes detailed prompts based on the current context and launches each task in its own worktree. ## 4. Do your thing [Section titled “4. Do your thing”](#4-do-your-thing) Work on your feature, fix a bug, or let an AI agent handle it. ## 5. Finish and clean up [Section titled “5. Finish and clean up”](#5-finish-and-clean-up) **Local merge:** Run `workmux merge` to merge into the base branch and clean up in one step. **PR workflow:** Use [`/open-pr`](/guide/skills/#open-pr) to push and open a PR. After it’s merged, run `workmux remove` to clean up. See [Workflows](/guide/workflows/) for more patterns including delegating tasks from agent sessions. ## Directory structure [Section titled “Directory structure”](#directory-structure) Here’s how workmux organizes your worktrees by default: ```plaintext ~/projects/ ├── my-project/ <-- Main project directory │ ├── src/ │ ├── package.json │ └── .workmux.yaml │ └── my-project__worktrees/ <-- Worktrees created by workmux ├── feature-A/ <-- Isolated workspace for 'feature-A' branch │ ├── src/ │ └── package.json │ └── bugfix-B/ <-- Isolated workspace for 'bugfix-B' branch ├── src/ └── package.json ``` Each worktree is a separate working directory for a different branch, all sharing the same git repository. This allows you to work on multiple branches simultaneously without conflicts. You can customize the worktree directory location using the `worktree_dir` configuration option (see [Configuration](/guide/configuration/)). ## Workflow example [Section titled “Workflow example”](#workflow-example) Here’s a complete workflow: ```bash # Start a new feature workmux add user-auth # Work on your feature... # (workmux automatically sets up your configured panes and environment) # When ready, merge and clean up workmux merge user-auth # Start another feature workmux add api-endpoint # List all active worktrees workmux list ``` ## The parallel AI workflow [Section titled “The parallel AI workflow”](#the-parallel-ai-workflow) Run multiple AI agents simultaneously, each in its own worktree. No conflicts, no branch switching, no stashing. ```bash # Spin up two agents working on different tasks workmux add refactor-user-model -p "Refactor the User model to use composition" workmux add add-search-endpoint -p "Add a /search endpoint with pagination" # Each agent works in isolation. Check progress via tmux windows or the dashboard workmux dashboard # Merge completed work back to main workmux merge refactor-user-model workmux merge add-search-endpoint ``` Tip Use `-A` (`--auto-name`) to [generate branch names automatically](/reference/commands/add/#automatic-branch-name-generation) from your prompt, so you don’t have to think of one. See [AI Agents](/guide/agents/) for details on prompts, multi-agent generation, and agent status tracking. # Remote servers > Run individual agents on an SSH-reachable Linux server while others stay on your machine Experimental Remote servers are experimental. Try them out, and if something doesn’t work or a workflow you need is missing, [open an issue on GitHub](https://github.com/raine/workmux/issues). workmux can run an agent on a Linux server you reach over SSH, such as a home server, a Proxmox VM or a cloud VM, while your other agents stay on the local machine. Each remote agent still gets a normal tmux window on the local machine, and shows up in the dashboard, the sidebar, `workmux status` and `workmux list` like a local one. The agent keeps running while the local machine sleeps, loses its network or closes the window. When you come back, the window reconnects by itself. When the work is done, `workmux merge` brings it home and merges it on the local machine. ******\~/code/api ☾**Local machine asleep** **Your machine**tmux · gitssh**devbox**node · docker ☾ lid closed · 34 min An agent starts on devbox, keeps working while the local machine sleeps, and merges home. Use a remote server when: * agents need more CPU, memory or disk than your machine should give them * agents should keep working while your machine sleeps or is offline * you want to run more agents in parallel than your machine handles comfortably If you only want to isolate agents on the local machine, use the [sandbox](/guide/sandbox/) instead. ## How it fits together [Section titled “How it fits together”](#how-it-fits-together) * The worktree, its panes and the agent run on the server, either directly or in a Docker container. The local window is a live view of them. * The local machine stays the source of truth for Git. A new workspace starts from a local commit, unpushed commits included, and its work comes back with `merge` or `remote pull`. The server never talks to your Git hosting. * workmux installs and updates its own copy on the server. You don’t install workmux there yourself. * Remote agents appear in every view labelled `handle@remote`, for example `my-feature@devbox`. ## Quick start [Section titled “Quick start”](#quick-start) Add the server to your global config: \~/.config/workmux/config.yaml ```yaml remotes: devbox: # the name you use on the command line host: devbox # an ~/.ssh/config alias or user@host ``` Then, from your project: ```bash workmux remote setup devbox # install workmux on the server workmux remote doctor devbox # check everything an agent needs workmux remote login devbox claude # log the agent in on the server workmux add my-feature --remote devbox -p "Implement the parser" ``` The window opens on the local machine as usual. When the agent is done: ```bash workmux merge my-feature ``` Put the branch before a bare `--remote` `--remote` takes an optional name, so in `workmux add --remote my-feature` the branch is read as the remote name. Write `workmux add my-feature --remote`, or name the remote: `workmux add --remote devbox my-feature`. ## Differences from local agents [Section titled “Differences from local agents”](#differences-from-local-agents) * Agents run directly on the server unless the sandbox is enabled. See [server or Docker](/guide/remote/setup/#server-or-docker). * Remote agents need tmux in window mode, and the dashboard can’t create them. * Agents on the server can’t push. Bring the work home and push from the local machine. * Files ignored by Git, such as `node_modules` or build output, don’t come home. * `rename`, `path`, `run` and `sync-files` don’t work on remote workspaces. The full list is under [known limitations](/guide/remote/troubleshooting/#known-limitations). ## Next [Section titled “Next”](#next) * [Setting up a server](/guide/remote/setup/): requirements, config, running on the server or in Docker, `setup` and `doctor`, which config the server uses, security. * [Logins and secrets](/guide/remote/logins/): logging agents in, importing credentials, the Claude token, environment variables. * [Working with remote agents](/guide/remote/usage/): commands on remote workspaces, `rm` and `merge` from a remote pane, sleep and disconnects, agents that start agents, server reboots. * [Bringing work home](/guide/remote/git/): merging, operation logs, rebasing, `remote pull`, what doesn’t come home, pushing. * [Maintenance and troubleshooting](/guide/remote/troubleshooting/): upgrades, cleaning up, retiring a server, common problems, known limitations. # Bringing work home > Merge, rebase and move remote workspaces back to the local machine The local machine stays the source of truth for your repository. Work goes to the server as a commit when a workspace is created, and comes back to the local machine with `merge` or `remote pull`. ## Merging [Section titled “Merging”](#merging) ```bash workmux merge my-feature ``` This copies the workspace’s branch, staged and unstaged changes and untracked files into a local worktree, runs your normal local merge there, then removes the remote workspace, its agent and its branch. `merge_strategy`, `--rebase`, `--squash`, `--into` and `--keep` work as for a local worktree, and `pre_merge` hooks run on the local machine. ### Preparing the merge worktree [Section titled “Preparing the merge worktree”](#preparing-the-merge-worktree) The local worktree gets your `files` and `post_create` hooks, but has no panes, so pane commands never run there. Files ignored by Git, such as `node_modules`, don’t come from the server either. If `pre_merge` needs dependencies, install them in `post_create` or share them with `files`: ```yaml post_create: - cd docs && bun install pre_merge: - just check ``` Keep setup hooks repeatable: they run for every fresh merge attempt. If setup fails, the merge stops and the remote workspace stays. | Flag | Skips | | ------------- | ------------------------------------------------------- | | `--no-verify` | `pre_merge` hooks | | `--no-hooks` | all hooks, including `post_create`; `files` still apply | ### Uncommitted work, conflicts and cleanup [Section titled “Uncommitted work, conflicts and cleanup”](#uncommitted-work-conflicts-and-cleanup) * Unstaged changes and untracked files on the server refuse the merge unless you pass `--ignore-uncommitted` or `--keep`. With `--ignore-uncommitted`, they aren’t merged and are removed with the workspace. * On a conflict, resolve it in the local worktree and run `workmux merge my-feature` again. * If the agent changed the workspace after its work was copied, the remote workspace is kept and the merge says so. * If the server can’t be reached after the merge, its cleanup is left pending. The next command that reaches the server finishes it without merging again. * With `--keep` (or `merge_keep: true`), the remote workspace and agent stay, and the remote branch moves to the merged result. ## Operation logs [Section titled “Operation logs”](#operation-logs) A merge or removal [requested from a remote pane](/guide/remote/usage/#remove-or-merge-from-a-remote-pane) runs in the background on the local machine. Its output, including hook output, is saved on the local machine: ```bash workmux remote logs devbox # list log files workmux remote logs devbox r0123456789ab # print one request's output ``` The pane prints the exact command for its request. Logs are private files under `~/.local/state/workmux/remote//operation-logs/`, readable without a connection to the server. They may contain sensitive hook output and aren’t deleted automatically. Hook output never goes to the server. ## Rebasing [Section titled “Rebasing”](#rebasing) ```bash workmux rebase my-feature ``` Sends the local machine’s base branch to the server and rebases the workspace there, committing as your local Git identity. The agent keeps running. Conflicts stay on the server: run `workmux open my-feature` and resolve them in the remote worktree. ## Moving a workspace to the local machine [Section titled “Moving a workspace to the local machine”](#moving-a-workspace-to-the-local-machine) ```bash workmux remote pull my-feature ``` Stops the remote agent, brings the branch, staged and unstaged changes and untracked files home as a local worktree, opens its window and removes the remote workspace. The window runs your configured panes, so a fresh local agent starts there; the remote agent’s conversation isn’t carried over. Pass `--no-hooks` to skip the local `post_create` hooks. ## What doesn’t come home [Section titled “What doesn’t come home”](#what-doesnt-come-home) Merge and `remote pull` carry commits, staged and unstaged changes, and untracked files. They don’t carry: * files ignored by Git, such as build output or `.env` files edited on the server * the contents of submodules, only the recorded commit * agent state, such as conversations and caches An untracked nested Git repository, an unfinished merge, rebase or cherry-pick, or a detached HEAD in the remote worktree blocks the copy until you resolve it on the server. ## Pushing [Section titled “Pushing”](#pushing) Agents on the server can’t push to your Git hosting: the server has no `origin` and no credentials for it. Bring the work home with `merge` or `remote pull`, and push from the local machine. # Logins and secrets > Log agents in on a remote server and give them environment variables Remote agents can’t use the local machine’s logins. Their logins live in the SSH user’s home directory on the server and are shared by every workspace there, in both modes, so you log each agent in once per server. ## Log in on the server [Section titled “Log in on the server”](#log-in-on-the-server) ```bash workmux remote login devbox [-- ] ``` This runs the agent’s own login flow on the server, attached to your terminal. In Docker mode it runs in the agent’s sandbox image; on the server directly, the agent must be installed there. | Agent | Login that runs | Notes | | ---------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------ | | `claude` | `claude auth login` | Open the printed URL on the local machine and paste the code back. See also [`--setup-token`](#claude-long-lived-token). | | `codex` | `codex login` | The browser returns through a forwarded port. Without a browser, pass `-- --device-auth`. | | `gemini` | `gemini` | Trust the folder, choose “Sign in with Google”, open the URL and paste the code back. Leave with `/quit`. | | `opencode` | `opencode auth login` | Pick a provider; browser logins return through a forwarded port. | | `pi` | `pi` | Type `/login` and pick a provider. Leave with `/quit`. | | `omp` | `omp login` | Pick a provider, or name one: `-- anthropic`. | When a login’s browser flow calls back to `localhost`, workmux forwards that port from the local machine, so you can open the URL in the local machine’s browser. Naming a provider in the extra arguments forwards only its port. A port already in use on the local machine is skipped with a warning. Some login screens take over Ctrl-C. Leave them with the agent’s own exit command, or press Ctrl-P Ctrl-Q to leave a container login. Note With a `sandbox.image` override, Docker-mode logins run in that image, so it must contain the agent you log in. ## Copy logins from the local machine [Section titled “Copy logins from the local machine”](#copy-logins-from-the-local-machine) ```bash workmux remote login devbox codex --import ``` `--import` copies the agent’s credential files from the local machine, and nothing else from its directory. * It is a one-time copy. Agents rotate their refresh tokens as they use them, so once either machine refreshes, the other copy can stop working. Import again or log in on the server when that happens. * On macOS, Claude Code keeps its login in the Keychain, which workmux doesn’t read. Use `remote login` or `--setup-token` for Claude. * `omp` keeps its logins in a database with its other state, so it can’t be imported. ## Claude long-lived token [Section titled “Claude long-lived token”](#claude-long-lived-token) ```bash workmux remote login devbox claude --setup-token ``` Runs `claude setup-token` on the server, then asks you to paste the token it printed (the input is hidden). Every Claude agent on that server’s `path` uses the token, in both modes. It is stored privately on the server. Press Enter without a token to keep the current one. ## Environment variables [Section titled “Environment variables”](#environment-variables) In Docker mode, [`sandbox.env_passthrough`](/guide/sandbox/container/#configuration) values are read from the local machine’s environment when you run `workmux add --remote`, because the local machine may be asleep when the agent needs them. `sandbox.env` values are added after them and win on a name conflict. They are stored privately on the server. * They are read once per workspace. Changing a value on the local machine doesn’t update existing workspaces; create a new one. * Variables unset on the local machine, and values containing a line break or NUL, aren’t sent. `add` names them. * Agents running directly on the server don’t get `sandbox.env` or `env_passthrough`. ## Check logins [Section titled “Check logins”](#check-logins) `remote doctor` shows one row per configured agent with the credential files it finds, and points at `remote login` when they are missing. It can’t tell whether a login has expired, or whether `omp` is logged in. # Setting up a server > Prepare a Linux server, add it to your config and choose how its agents run ## Requirements [Section titled “Requirements”](#requirements) * Linux on x86-64 or ARM64. * SSH that works without a prompt. workmux never asks for a password or to accept a host key, so use a key loaded in your SSH agent or one without a passphrase, and run `ssh ` once yourself. Aliases from `~/.ssh/config`, including `ProxyJump`, `Port` and `User`, work. * Git and tmux 3.3 or newer. * systemd linger for the SSH user, so agents survive the end of the SSH session: ```bash sudo loginctl enable-linger ``` * Network access to the APIs your agents use. The server doesn’t need access to GitHub: the local machine downloads the workmux release, verifies it and uploads it. What else the server needs depends on [where agents run](#server-or-docker). ## Add the server to your config [Section titled “Add the server to your config”](#add-the-server-to-your-config) ```yaml # ~/.config/workmux/config.yaml (global config only) remotes: devbox: # the name you use on the command line host: devbox # an ~/.ssh/config alias or user@host ``` Names may contain letters, digits, `.`, `_` and `-`, and must start with a letter or digit. `local` is reserved. `remotes` only works in your global config. A project’s `.workmux.yaml` can’t add a server, so a repository can’t send your code anywhere; it can only choose among your servers with [`placement`](#choosing-where-new-agents-go). The other keys, `path`, `isolation` and `binary`, are in the [configuration reference](/guide/configuration/#remotes). ## Server or Docker [Section titled “Server or Docker”](#server-or-docker) Remote agents are sandboxed exactly when the same agent would be sandboxed locally. `remotes..isolation` overrides that for one server, in either direction. | `sandbox.enabled` | `remotes..isolation` | Agents run | | ----------------- | -------------------------- | ------------- | | off (default) | unset | on the server | | on | unset | in Docker | | any | `none` | on the server | | any | `container` | in Docker | The two modes need different things on the server and behave differently in a few places: | | On the server | In Docker | | ----------------------------------------- | ------------------------------------------------- | -------------------------------------------------- | | Agent CLIs | Install each one on the SSH user’s login `PATH` | Come from the sandbox image | | Also needs | Your project’s tools, if hooks or agents use them | Docker, usable without `sudo`; access to `ghcr.io` | | Sandbox | None, with the agent’s normal permission prompts | The [container sandbox](/guide/sandbox/container/) | | `workmux rm` and `merge` in a remote pane | Ask the local machine to do it | Agents can ask the local machine, without hooks | | `sandbox.env` and `env_passthrough` | Not used | Used | workmux doesn’t install agents on the server and doesn’t fall back to Docker: if the agent’s CLI is missing on the server, `add --remote` stops before creating anything. Podman isn’t supported on servers. No sandbox on the server Agents running directly on the server have the SSH user’s full access to it. Only use this mode on a machine you’d let the agent use freely. Run `remote setup`, `remote doctor` and `remote login` from the same project directory as `add`, because the project’s `sandbox.enabled` decides the mode. Outside a project they use your global settings. `add` and `doctor` print the mode and the setting that chose it. Each workspace keeps the mode it was created with, even if your settings change later. ## Install and check [Section titled “Install and check”](#install-and-check) ```bash workmux remote setup devbox ``` Installs the workmux that matches your local version on the server, plus workmux’s [status hooks](/guide/status-tracking/) for the supported agents. It is safe to run again. `add --remote` and `remote login` install workmux on first use too, but running `setup` first shows problems early. ```bash workmux remote doctor devbox ``` Checks SSH, the server’s architecture, workmux, Git, tmux, linger, agent CLIs or Docker, status hooks and logins, and prints a fix for each failing check. In Docker mode it also pulls the sandbox image, so the first run can take a while. See [`remote doctor`](/reference/commands/remote/#remote-doctor) for every check. ```bash workmux remote ``` Lists your servers and whether each one is reachable and set up. Then [log your agents in](/guide/remote/logins/). ## Choosing where new agents go [Section titled “Choosing where new agents go”](#choosing-where-new-agents-go) Agents are created locally unless you ask otherwise: * `workmux add --remote []` creates the agent on a server. The name is optional when `placement` names a server or only one is configured. * `workmux add --local` creates it locally, overriding `placement`. * `placement` sets the default: `local` (the default) or a server name. ```yaml # ~/.config/workmux/config.yaml or .workmux.yaml placement: devbox ``` A project’s `placement` wins over the global one, so a project can send its agents to a server or keep them local. If `placement` names a server that isn’t configured, `add` fails and suggests `--local`. Where a workspace lives is decided when it is created. Later commands such as `open`, `merge` and `remove` find it by its handle. The dashboard creates local agents only, and refuses when `placement` names a server. ## What the server uses from your config [Section titled “What the server uses from your config”](#what-the-server-uses-from-your-config) A remote workspace runs a copy of the local machine’s effective config, taken when the workspace is created. The server’s own workmux config and the worktree’s `.workmux.yaml` are never read. `add --remote` warns about settings it couldn’t apply. * **Applied:** `panes`, `agent`, `agents`, `post_create`, `pre_remove`, `remote_files`, the status icons and format, and `hook_shell` unless it is an absolute local path. An absolute `hook_shell` such as `/opt/homebrew/bin/bash` names a local program, so remote hooks run with `bash -c` instead. * **Applied in Docker mode:** `sandbox.image`, `target`, `network`, `toolchain`, `env`, `env_passthrough`, and `container.cpus`, `memory`, `group_add`, `cap_add`, `security_opt` and `excluded_files`. The sandbox is always Docker there. * **Not applied**, because they name local resources: Lima, other container runtimes, `rpc_host`, `extra_mounts`, `agent_config_dir`, `host_commands`, `container.devices` and `container.oci_runtime`. Two routine adjustments are not shown on every `add`: falling back to `bash -c` for an absolute `hook_shell`, and leaving local `files` behind when `remote_files` is not configured. Both are recorded in the workmux log, `$XDG_STATE_HOME/workmux/workmux.log` (`~/.local/state/workmux/workmux.log` by default), as lines starting with `remote config:`: ```bash grep 'remote config:' ~/.local/state/workmux/workmux.log ``` `post_create` and `pre_remove` hooks run on the server, in the remote worktree. If `add --remote` fails partway, run it again with the same arguments: it resumes and doesn’t repeat hooks that already finished. ## Supplemental files [Section titled “Supplemental files”](#supplemental-files) The Git checkout is transferred automatically. Extra local files are sent only when selected in `remote_files`; the local `files` settings do not apply remotely. ```yaml files: symlink: - tests/venv # Shared locally, never uploaded by this setting remote_files: copy: - .env - CLAUDE.local.md symlink: - shared-data ``` * **`copy`** sends the current local contents into each laptop-created workspace. * **`symlink`** seeds a shared directory on the remote, then links from the workspace. Existing sources are reused, not refreshed. Changes through a link are shared between remote workspaces. Both lists accept globs and resolve paths relative to the configuration directory, just like `files`. Remote symlink patterns also match existing sources in the remote project’s shared directory. The combined upload limit is 64 MiB per workspace; sources exceeding the remaining budget are skipped with a warning. Selecting a local symlink uploads its target’s contents. Without `remote_files`, no supplemental files are uploaded, including ignored `CLAUDE.local.md`. Global `remote_files` settings are inherited independently of `files`. Project lists replace the corresponding global lists unless they include `""`. To disable both inherited lists explicitly: ```yaml remote_files: copy: [] symlink: [] ``` An empty object (`remote_files: {}`) still inherits global lists. When local file settings exist but remote lists are unset, workmux records a `remote config:` note in the log; explicit empty lists suppress it. Selection changes apply to new workspaces, not existing ones, and do not delete cached sources. Workspaces spawned by a remote agent reuse their parent’s saved copies and symlink selections without contacting the laptop. Resuming creation does not repeat an already completed file stage. ## Security [Section titled “Security”](#security) Treat the server as an extension of your local machine: the SSH user runs every agent and holds their logins. Use a server or VM dedicated to agents, and treat what agents produce there as untrusted, as with a [local sandbox](/guide/sandbox/#security-model). * **No host commands.** [Host command proxying](/guide/sandbox/features/#host-command-proxying) is off on servers. In Docker mode, agents can only run what their container has. * **No Git credentials.** The server has no `origin`, and workmux connects without SSH agent or X11 forwarding. Anything else you give agents, such as tokens in `sandbox.env`, is up to you. * **Local actions stay local.** A remote pane or agent can ask the local machine to remove or merge its own workspace, and nothing else; hook output from that work stays on the local machine. A request from a container runs no hooks. `workmux close` and image paste fail with a message saying what to run on the local machine. * **Hooks run outside the container.** `post_create` and `pre_remove` run on the server as the SSH user, as they run on the local machine for local agents. They come from your local config. * **Firewall the Docker bridge** if the server routes or forwards it to the outside. The sandbox’s RPC bridge and proxy listen on the bridge address. workmux marks remote worktrees as trusted in Claude and Codex, so they start without asking whether to trust the folder. Folders you marked untrusted stay untrusted. A trusted folder lets the agent load the repository’s own agent settings, such as `.codex/config.toml`. # Maintenance and troubleshooting > Upgrade, clean up and retire remote servers, and fix common problems ## Upgrading workmux [Section titled “Upgrading workmux”](#upgrading-workmux) After you upgrade workmux on the local machine, the next command that reaches a server installs the matching version there. Running agents keep the version they started with. If you run workmux built from source, the server needs a Linux build of the same source: point [`remotes..binary`](/guide/configuration/#remotes) at it. ## Cleaning up a server [Section titled “Cleaning up a server”](#cleaning-up-a-server) ```bash workmux remote gc devbox --dry-run # list only workmux remote gc devbox # list, ask, remove workmux remote gc devbox --force # remove without asking, including unsaved work ``` `remote gc` lists what is on the server that no workspace on this machine accounts for, and removes it after you confirm: workspaces the local machine has no record of (for example after `remove --force` while the server was unreachable), leftover worktrees, sessions and containers, and workmux versions no agent uses. It also forgets local records of workspaces the server no longer has. A workspace with uncommitted changes or commits beyond its base is listed, but only removed with `--force`. Workspaces in the middle of starting, a merge or a pull are left alone. Without a terminal, nothing is removed unless you pass `--force`. One machine per `path` `gc` treats every workspace this machine doesn’t know as unused. If two machines use the same server, give each its own [`path`](/guide/configuration/#remotes). ## Retiring a server [Section titled “Retiring a server”](#retiring-a-server) 1. Merge, pull or remove the workspaces you want to keep. 2. Run `workmux remote gc devbox --force`. This removes work that exists only on the server. 3. Delete the server’s `path` directory, `~/.workmux-node` by default. workmux has no uninstall command. 4. Remove the server from `remotes`, and from any `placement` that names it. If the server is already gone, `workmux remove --force ` forgets its workspaces on the local machine. ## Common problems [Section titled “Common problems”](#common-problems) **`ssh` fails or asks for a password.** Run `ssh ` yourself first. workmux never prompts, so the key must be in your SSH agent or have no passphrase, and the host key must already be in `known_hosts`. `remote doctor` names the failing step: authentication, host key, DNS, refused connection or timeout. **Docker permission denied after adding the user to the `docker` group.** workmux reuses an SSH connection for up to ten minutes, which keeps the old group membership. Doctor’s fix includes the command that closes the connection. **Agents stop when you log out of the server.** Enable linger: `sudo loginctl enable-linger `. **An agent asks you to log in.** Run `workmux remote login `. `remote doctor` shows which agents have credentials on the server. **A login fails because the agent is missing.** On the server directly, install the agent there. In Docker mode with a `sandbox.image` override, the image must contain the agent. **No status icons for a remote agent.** Run `workmux remote setup ` again and check doctor’s `hooks` row. For agents on the server directly, OpenCode’s hooks are installed once its CLI is on the login `PATH`. In Docker mode, they need the OpenCode sandbox image on the server, so run `setup` again after its first agent or login there. **Codex asks to review hooks on the server.** Codex outside a sandbox asks once to trust workmux’s status hooks. Attach to the agent and trust them; Codex asks again only when the hooks change. **`workmux: command not found` in a remote pane.** Expected in a Docker-mode shell pane: run the command on the local machine. The agent’s container has `workmux`. On the server directly, `workmux` is on every pane’s `PATH`. **`rm` or `merge` in a remote pane says the request was withdrawn.** The local machine isn’t connected, or runs an older workmux. Run the command on the local machine instead. **A merge requested from a remote pane failed.** The pane prints a `workmux remote logs` command. Run it on the local machine to see the full output. **Protocol mismatch.** The server’s workmux doesn’t match your local one. This happens with builds from source; point `binary` at a Linux build of the same source. **Something is left over on the server.** Run `workmux remote gc --dry-run`. ## Known limitations [Section titled “Known limitations”](#known-limitations) * Remote agents need tmux in window mode. Session mode, `windows:` configs and other multiplexers aren’t supported for them. * Servers run Linux and use Docker for sandboxing; Podman, Lima and Apple Container aren’t available there. * The dashboard can’t create remote agents; use `workmux add --remote`. * Agents on a server can’t push, read the local machine’s clipboard or run host commands. * `rm` and `merge` requested from a container run without hooks. * Ignored files, submodule contents and agent conversations don’t come home with `merge` or `remote pull`. * The environment snapshot is taken once per workspace. * Imported credentials can drift apart from the local machine’s copy. `omp` logins can’t be imported, and doctor can’t tell whether `omp` is logged in. * The dashboard’s diff view of a remote agent is fetched from the server and cached; patch mode is local-only. * Operation logs aren’t deleted automatically. * A server’s `path` is meant for one machine. # Working with remote agents > Day-to-day commands, remote panes, disconnects and reboots for agents on a remote server ## Commands on remote workspaces [Section titled “Commands on remote workspaces”](#commands-on-remote-workspaces) Remote workspaces use the usual commands. Run them from the project on the local machine and name the workspace by its handle. | Command | On a remote workspace | | ------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------- | | [`close`](/reference/commands/close/) | Closes the local window only. The agent keeps running. | | [`open`](/reference/commands/open/) | Reattaches to the running agent, or starts the panes again if they ended. | | [`resurrect`](/reference/commands/resurrect/) | Reopens windows of agents still running after the local machine’s tmux restarted, without restarting them. | | `status`, `wait`, `send`, `capture` | Work whether or not the window is open. Agents are labelled `handle@remote`. | | [`shell`](/reference/commands/shell/) | Opens a shell in the workspace on the server, in the current terminal. | | [`list`](/reference/commands/list/) | Shows remote workspaces with their server. | | [`remove`](/reference/commands/remove/) | Stops the agent and removes the remote worktree, branch and window, with the same checks as a local remove. | | [`merge`](/guide/remote/git/#merging), [`rebase`](/guide/remote/git/#rebasing) | See [bringing work home](/guide/remote/git/). | | `rename`, `path`, `run`, `sync-files` | Not supported. | `remove --all` and `remove --gone` only remove local worktrees. A remote branch such as `origin/feature` can’t be the new workspace’s branch: fetch it and pass it with `--base`. Some other `add` options aren’t available either; see [`add`](/reference/commands/add/#remote-workspaces). ## Sending prompts [Section titled “Sending prompts”](#sending-prompts) `workmux send` and `wait` work as they do locally, including `send --wait`, the refusal of agents waiting on a dialog, and pane-ID targets for workspaces with several agents. An agent running directly on the server can only receive `send` once it has reported its first status, so give the first prompt with `add -p` or type it into the window. In Docker mode, `send` works as soon as the agent’s container is running. ## Panes on the server [Section titled “Panes on the server”](#panes-on-the-server) Every pane in the window is a session on the server. Non-agent panes are shells on the server, or in the container with `sandbox.target: all`. * **On the server directly:** `workmux` works in every pane, including the shell left after the agent exits. It is the server’s copy, which knows the pane’s workspace. * **In Docker:** shell panes on the server have no `workmux`. Run workmux commands for the workspace on the local machine. The agent’s container has `workmux`, for [`merge` and `rm`](#remove-or-merge-from-a-remote-pane) and [starting agents](#agents-that-start-agents). ### Opening a shell on the server [Section titled “Opening a shell on the server”](#opening-a-shell-on-the-server) A tmux split of the window starts a shell on the local machine, not on the server. Run [`workmux shell`](/reference/commands/shell/) in the split to get a shell in the workspace’s working directory on the server. In Docker mode the shell runs in a new container of the workspace; `--host` runs it on the server instead. Exiting the shell leaves the agent running. ## Remove or merge from a remote pane [Section titled “Remove or merge from a remote pane”](#remove-or-merge-from-a-remote-pane) In a workspace running directly on the server, type the usual commands in any of its panes. An agent can run them too, including in Docker: ```bash workmux merge workmux rm ``` The local machine does the work, exactly as if you had run `workmux merge my-feature` or `workmux rm my-feature` there: it uses the local machine’s config, hooks and base branch, and closes the window when it is done. Meanwhile the pane shows the local machine’s progress: ```plaintext Merging 'my-feature' on the local machine… Started on the local machine; follow with `workmux remote logs devbox r0123456789ab` Bringing the work to the local machine… (1s) Preparing a local copy for the merge (files, post_create)… Running pre_merge hooks locally… (42s) ``` The [log](/guide/remote/git/#operation-logs) holds the full hook output. * The local machine must be awake and connected. If it doesn’t pick the request up within about 15 seconds, the request is withdrawn and the command fails with “the local machine isn’t connected”. * Only the workspace’s own handle works: no name, `.`, or the handle itself. * Nothing can ask questions, so these are refused with a hint: removing a workspace with unmerged commits without `--force`, merging staged changes that need a commit message (commit them first), squash merges, `rm --all`, `--gone` and `--keep-branch`. `close` is refused too, because the window is on the local machine. * If the merge fails, the workspace stays and the pane prints why. * In Docker mode, these requests run no hooks: no `post_create`, `pre_merge` or `pre_remove`, and no Git hooks, as for a [local sandbox](/guide/sandbox/#security-model). Hooks would run outside the container on code the agent wrote. Run `workmux merge ` on the local machine when you want them. An agent can finish its own task this way, for example with `-p "… when the tests pass, run: workmux merge"` or the bundled [`/merge` skill](/guide/skills/). ## When the local machine sleeps or disconnects [Section titled “When the local machine sleeps or disconnects”](#when-the-local-machine-sleeps-or-disconnects) The agent, its container and its tmux session run on the server, so they don’t depend on the local machine. * The agent keeps working, and its status is recorded on the server. * The window shows a status line with the server’s name and the reason, reconnects by itself, and offers keys to retry now or close the pane. * Keystrokes typed while disconnected are dropped, never delivered late. * The dashboard, sidebar and `workmux status` keep showing the agent’s last known state, marked disconnected with when it was last seen. Short interruptions pass without any visible change. After an authentication or host key failure, or when the session was attached from somewhere else, the window doesn’t retry by itself: fix the cause and press the retry key. ## Agents that start agents [Section titled “Agents that start agents”](#agents-that-start-agents) An agent on a server can start a sibling the same way a local agent does (see [spawning agents](/guide/workflows/#from-an-ongoing-agent-session)). The sibling is created on the same server, even while the local machine is away: ```bash # run by the agent on the server workmux add parser-tests -b -P task.md ``` * The agent must name a new branch. Generated names and existing branches are refused. * The sibling starts from the tip of the agent’s branch, with the same mode, config, files and environment. `post_create` hooks don’t run. * Its window opens next to the parent’s the next time the local machine connects. If it doesn’t, run `workmux list` from the project’s repository, or `workmux open `. ## When the server reboots [Section titled “When the server reboots”](#when-the-server-reboots) A reboot stops the agents and containers, but worktrees, branches and records survive. The dashboard, `status` and `list` show the agent as exited because the server rebooted. To start it again: ```bash workmux open my-feature ``` The agent starts with its continue flag, so agents that keep their conversations on disk pick up where they left off. `open` says whether it continued. The original prompt isn’t sent again, and nothing restarts automatically at boot. # Sandbox > Run agents in isolated containers or VMs for enhanced security workmux provides first-class sandboxing for agents in containers or VMs. Agents are isolated from host secrets like SSH keys, AWS credentials, and other sensitive files. When a supported agent runs in a sandboxed agent pane, workmux automatically disables its interactive permission prompts and relies on the configured sandbox backend as the security boundary. Status indicators, the dashboard, [spawning agents](/guide/workflows/#from-an-ongoing-agent-session), [merging](/guide/workflows/#direct-merge), and [image pasting](/guide/sandbox/features/#clipboard-proxy) all work the same with or without a sandbox. A built-in RPC bridge keeps host-side workmux features in sync with agent activity inside the sandbox. ![Claude Code running inside a Lima VM sandbox](/_astro/sandbox-claude.DfXFzoMS_1CR60K.webp) ## Security model [Section titled “Security model”](#security-model) Threat model The sandbox limits an agent’s access to host files, credentials, and processes, but the agent can edit the Git repository. Those edits are inherently untrusted and may run as your host user when you later build, test, or otherwise use the repository. Workmux host Git operations can also run configured content filters and merge drivers from the writable worktree. Host-side hooks and pane commands from `.workmux.yaml` and explicitly proxied host commands are also outside the sandbox boundary. Lima exposes writable Git metadata. **Do not use workmux sandbox if your threat model requires sandboxed agents to have no influence over code that runs on the host.** When sandbox is enabled, agents have access to: * The current worktree directory with read-write access * Git operational data needed for commits, branches, merges, and rebases * Agent settings and credentials (see [credentials](/guide/sandbox/features/#credentials)) Container backends keep repository config and shared hooks read-only. Existing hooks can run inside the container, while hook setup stays in a regular host pane. Git operations on the host honor configured content filters, merge drivers, and credential helpers. Programs stored in the writable worktree remain repository content and may change during a sandbox session. See [Git hooks](/guide/sandbox/container/#git-hooks) for details. The Lima backend uses broad writable project mounts and requires explicit acceptance of its [reduced Git metadata isolation](/guide/sandbox/lima/#git-metadata-boundary). ### Agent permission prompts [Section titled “Agent permission prompts”](#agent-permission-prompts) For sandboxed agent panes, workmux automatically enables each supported agent’s noninteractive approval mode, such as `--dangerously-skip-permissions` for Claude or `--yolo` for Codex and Gemini. The sandbox backend, rather than the agent’s permission prompts, is the security boundary. Agents without a known approval flag are unchanged. Host secrets like SSH keys, AWS credentials, and GPG keys are not accessible. Additional directories can be mounted via [`extra_mounts`](/guide/sandbox/features/#extra-mounts). Outbound network access can be restricted to only approved domains using [network restrictions](/guide/sandbox/container/#network-restrictions) (container backend). When enabled, a CONNECT proxy and iptables firewall work together to block unauthorized connections and prevent access to internal networks. ## Choosing a backend [Section titled “Choosing a backend”](#choosing-a-backend) workmux supports two sandboxing backends: | | Container (Docker/Podman/Apple Container) | Lima VM | | -------------------- | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | | **Isolation** | Process-level (namespaces) or VM-level (Apple Container) | Machine-level (virtual machine) | | **Persistence** | Ephemeral (new container per session) | Persistent (stateful VMs) | | **Toolchain** | Custom Dockerfile or [host commands](/guide/sandbox/features/#host-command-proxying) | Built-in [Nix & Devbox](/guide/sandbox/lima/#nix-and-devbox-toolchain) support | | **Credential model** | Shared with host (see [credentials](/guide/sandbox/features/#credentials)) | Shared with host (see [credentials](/guide/sandbox/features/#credentials)) | | **Network** | Optional [restrictions](/guide/sandbox/container/#network-restrictions) (domain allowlist) | Unrestricted | | **Platform** | macOS, Linux (Apple Container: macOS only) | macOS, Linux | Container is a good default: it’s simple to set up and ephemeral, so no state accumulates between sessions. Choose Lima if you want persistent VMs with built-in Nix/Devbox toolchain support. To run agents on another machine instead, see [remote servers](/guide/remote/): individual agents run on an SSH-reachable Linux server, directly or in Docker, while the rest stay local. ## Adding tools to the sandbox [Section titled “Adding tools to the sandbox”](#adding-tools-to-the-sandbox) Agents often need project tooling (compilers, linters, build tools) available inside the sandbox. There are several ways to provide this depending on your backend: | Approach | Container | Lima | Details | | -------------------------- | --------- | ---- | -------------------------------------------------------------------------------------------------------------------------------------------------- | | **Host commands** | Yes | Yes | Proxy specific commands to the host via RPC. See [host command proxying](/guide/sandbox/features/#host-command-proxying). | | **Nix / Devbox toolchain** | No | Yes | Declare tools in `devbox.json` or `flake.nix` and they’re available automatically. See [toolchain](/guide/sandbox/lima/#nix-and-devbox-toolchain). | | **Custom provisioning** | No | Yes | Run a shell script at VM creation to install packages. See [custom provisioning](/guide/sandbox/lima/#custom-provisioning). | | **Custom Dockerfile** | Yes | No | Build a custom container image with your tools baked in. See [custom images](/guide/sandbox/container/#custom-images). | ## Quick start [Section titled “Quick start”](#quick-start) ### Container backend [Section titled “Container backend”](#container-backend) Install [Docker](https://www.docker.com/), [Podman](https://podman.io/), or [Apple Container](https://github.com/apple/container) (macOS 26+, Apple Silicon), then enable in config: ```yaml # ~/.config/workmux/config.yaml or .workmux.yaml sandbox: enabled: true ``` The pre-built image is pulled automatically on first run. See the [container backend](/guide/sandbox/container/) page for details. ### Lima VM backend [Section titled “Lima VM backend”](#lima-vm-backend) Install [Lima](https://lima-vm.io/) (`brew install lima`), then enable in config: ```yaml # ~/.config/workmux/config.yaml or .workmux.yaml sandbox: enabled: true backend: lima ``` The VM is created and provisioned automatically on first run. See the [Lima VM backend](/guide/sandbox/lima/) page for details. # Alternatives > How workmux sandboxing compares to Claude Code's built-in sandbox ## Claude Code’s built-in sandbox [Section titled “Claude Code’s built-in sandbox”](#claude-codes-built-in-sandbox) Scope Based on testing Claude Code v2.1.39 on macOS with sandbox auto-allow mode (February 2026). Behavior may change in future releases. See [Claude Code’s sandbox documentation](https://docs.anthropic.com/en/docs/claude-code/sandboxing) for the latest details. Claude Code has a native sandbox that uses OS-level primitives (Seatbelt on macOS, bubblewrap on Linux) to restrict bash commands. It is a useful guardrail, but it operates on a fundamentally different security model than container/VM sandbox. **Claude Code** uses *process-level restriction*. It wraps the `bash` tool process with OS sandbox rules while the agent itself runs directly on your host. **workmux sandbox** uses Docker/Podman containers or Lima VMs for *environment isolation*. The entire agent runs inside a separate container or VM. Host files that are not explicitly mounted do not exist inside the sandbox. ### Comparison [Section titled “Comparison”](#comparison) | | workmux sandbox | Claude Code sandbox | | ------------------------ | --------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Isolation** | Full environment (container/VM). The entire agent runs in a separate OS instance. | Process restriction (Seatbelt/bwrap). Only the Bash tool is sandboxed by the OS; Read, Edit, Write, and other tools run in the unsandboxed parent process. | | **Sensitive files** | Not present in the guest. `~/.ssh`, `~/.aws`, `~/.gnupg` simply do not exist. | Readable by default. Only `.env*` files are denied. Protection for `~/.ssh` and similar paths relies on model-level refusal, not OS enforcement. | | **Unsandboxed fallback** | No automatic retry path outside the sandbox. | Failed sandboxed commands can be retried unsandboxed by default (`dangerouslyDisableSandbox`). Retries go through the normal permission flow, but in auto-allow mode the prompt is easy to miss. Can be disabled with `allowUnsandboxedCommands: false`. | | **Hooks** | Run inside the sandbox. | Run in the unsandboxed Node.js parent process with full host access. | Claude’s sandbox can be hardened (`allowUnsandboxedCommands: false` and custom deny rules), but the scope remains Bash-only. If your threat model requires that a compromised agent cannot touch host secrets, a container or VM boundary is a stronger guarantee. # Container backend > Run agents in isolated containers using Docker, Podman, or Apple Container The container sandbox runs agents in isolated containers using Docker, Podman, or Apple Container, providing lightweight, ephemeral environments that reset after every session. ## Setup [Section titled “Setup”](#setup) ### 1. Install a container runtime [Section titled “1. Install a container runtime”](#1-install-a-container-runtime) ```bash # macOS brew install --cask docker # Docker Desktop # or brew install --cask orbstack # OrbStack (Docker-compatible) # or brew install podman # Podman ``` On macOS 26+ with Apple Silicon, you can also use [Apple Container](https://github.com/apple/container). When installed, it is auto-detected and preferred over Docker/Podman. ### 2. Enable sandbox in config [Section titled “2. Enable sandbox in config”](#2-enable-sandbox-in-config) Add to your global or project config: ```yaml # ~/.config/workmux/config.yaml or .workmux.yaml sandbox: enabled: true ``` The pre-built image (`ghcr.io/raine/workmux-sandbox:{agent}`) is pulled automatically on first run based on your configured agent. No manual build step is needed, but possible if required (see [custom images](#custom-images)). To pull the latest image explicitly: ```bash workmux sandbox pull ``` ## Configuration [Section titled “Configuration”](#configuration) | Option | Default | Description | | ------------------------- | --------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `enabled` | `false` | Enable container sandboxing | | `container.runtime` | auto-detect | Container runtime: `docker`, `podman`, or `apple-container`. Auto-detected from PATH when not set. On macOS, prefers Apple Container (`container`) over Docker/Podman. | | `container.memory` | `16G` (Apple Container) / none (others) | Memory limit for the container. Apple Container VMs default to 1 GB which is too low, so workmux sets `16G` by default. This is a ceiling, not an upfront allocation. Works with any runtime when explicitly set. | | `container.cpus` | none | CPU count for the container. Only passed when explicitly set. Apple Container defaults to 4 CPUs which is sufficient for most workloads. | | `container.devices` | `[]` | Host device nodes exposed to the sandbox (e.g. `/dev/kvm`, `/dev/ttyUSB0`). Passed to the runtime as `--device`. Docker and Podman only; Apple Container rejects. **Global config only.** | | `container.group_add` | `[]` | Supplementary groups added to the sandboxed process (e.g. `dialout`, `video`, or numeric GIDs). Passed to the runtime as `--group-add`. Docker and Podman only; Apple Container rejects. **Global config only.** | | `container.cap_add` | `[]` | Extra Linux capabilities granted to the container, passed verbatim as `--cap-add` (e.g. `ALL` or `SYS_ADMIN`). Docker and Podman only; Apple Container ignores it. Permissive values weaken host-kernel container isolation. **Global config only.** | | `container.security_opt` | `[]` | Security options passed verbatim as `--security-opt` (e.g. `seccomp=unconfined` or `no-new-privileges`). Docker and Podman only; Apple Container ignores it. Options can strengthen or weaken confinement. **Global config only.** | | `container.oci_runtime` | none (engine default) | OCI runtime to run the container under, passed as Docker or local Podman `--runtime`. Unset omits `--runtime`, deferring to the engine’s configured default. Set to e.g. `kata` for stronger VM-based isolation. Remote Podman rejects this flag; Apple Container ignores it. **Global config only.** | | `target` | `agent` | Which panes to sandbox: `agent` or `all` | | `image` | `ghcr.io/raine/workmux-sandbox:{agent}` | Container image name (auto-resolved from configured agent). | | `rpc_host` | auto | Override hostname for guest-to-host RPC. Defaults to `host.docker.internal` (Docker), `host.containers.internal` (Podman), or `192.168.64.1` (Apple Container). **Global config only.** | | `env_passthrough` | `[]` | Environment variables to pass through. **Global config only.** | | `env` | `{}` | Environment variables to set with explicit values (unlike `env_passthrough` which reads from host). **Global config only.** | | `extra_mounts` | `[]` | Additional host paths to mount (see [shared features](/guide/sandbox/features/#extra-mounts)). **Global config only.** | | `agent_config_dir` | per-agent default | Custom host directory for agent config. Supports `{agent}` placeholder. Overrides default mounts (e.g. `~/.claude/`). Auto-created if missing. **Global config only.** | | `network.policy` | `allow` | Network restriction policy: `allow` (no restrictions) or `deny` (block all except allowed domains). See [network restrictions](#network-restrictions). **Global config only.** | | `network.allowed_domains` | `[]` | Allowed outbound HTTPS domains when policy is `deny`. Supports exact matches, `*.` wildcard prefixes, and exact-host private destination opt-in. **Global config only.** | | `network.max_connections` | `128` | Maximum concurrent HTTPS proxy connections in deny mode. Must be between 1 and 1024. **Global config only.** | ### Example configurations [Section titled “Example configurations”](#example-configurations) **Minimal:** ```yaml sandbox: enabled: true ``` **With Podman and custom env:** ```yaml sandbox: enabled: true image: my-sandbox:latest env_passthrough: - GITHUB_TOKEN - ANTHROPIC_API_KEY env: GH_TOKEN: ghp_xxxxxxxxxxxx container: runtime: podman ``` **With Apple Container (macOS 26+):** ```yaml sandbox: enabled: true container: runtime: apple-container # memory: 16G # default, adjust if needed # cpus: 8 # optional, Apple Container defaults to 4 ``` Workmux requires an Apple Container build whose `container run` supports `--read-only-path`. This capability protects Git policy files inside otherwise writable project mounts. Workmux fails before starting the guest when the installed build lacks it. **With host hardware (USB serial, GPU, etc.):** ```yaml sandbox: enabled: true container: runtime: docker devices: - /dev/kvm - /dev/bus/usb/001/002:/dev/bus/usb/001/002:rwm # structured form is also supported: - host_path: /dev/ttyUSB0 guest_path: /dev/ttyUSB0 permissions: rw group_add: - dialout # access to serial devices - "46" # numeric GID if the name differs between host and container ``` Notes on hardware access: * Both `devices` and `group_add` are **global config only**. A project’s `.workmux.yaml` cannot opt into them; this prevents a repository from silently widening the sandbox. * Apple Container does not support `--device` or `--group-add`. Set `container.runtime: docker` (or `podman`) if you need hardware access. * Group names (e.g. `dialout`) must resolve inside the container image. When the host and image disagree on GIDs (common across distros), use numeric GIDs. * In network-deny mode, workmux drops privileges inside the container via `setpriv` (replacing `gosu`), which preserves the configured supplementary groups. This means hardware access works in both `allow` and `deny` network modes. * Rootless Podman may require additional configuration to access host devices; see Podman’s own documentation on `keep-groups` and subgid mapping if you hit permission errors. **Hide specific files from the container:** ```yaml sandbox: enabled: true container: excluded_files: - .env - .env.local ``` Listed paths are relative to the worktree root. Each one is shadowed by a read-only `/dev/null` bind mount, so agents running inside the container cannot read the host file without having to restructure the project. Files reachable via workmux’s main-worktree mount (including symlinks from the current worktree into it) are masked at both paths. Absolute paths and entries containing `..` components are rejected; files that don’t exist on disk are skipped with a warning. **Security: global-only.** `excluded_files` is ignored when set in a project’s `.workmux.yaml`; it must be configured in your global config (`~/.config/workmux/config.yaml`). This prevents a malicious repo from deleting protections via its own config. **Note:** `excluded_files` relies on file-level bind mounts, which Apple Container does not support (it only accepts directory mounts). When the runtime is Apple Container and `excluded_files` is set, workmux fails fast rather than silently leaving secrets readable. Use Docker or Podman if you need this feature. **Run under a VM-based OCI runtime (stronger isolation):** ```yaml sandbox: enabled: true container: runtime: docker oci_runtime: kata ``` `oci_runtime` is passed straight through to Docker or local Podman as `--runtime`, so the container runs under whatever OCI runtime you name instead of the engine’s configured default. Pointing it at a VM-based runtime such as [Kata Containers](https://katacontainers.io/) gives each sandbox a hardware-VM boundary while reusing the exact same container image, mounts, user mapping, and RPC path as the normal container backend. Leaving it unset keeps the engine’s default behavior. The named runtime must already be installed on the host and registered with your container engine (for Docker, listed under `docker info`’s runtimes). Setting it up is out of scope here. See the runtime’s own documentation. Notes: * **Global config only.** Like `devices`/`group_add`, `oci_runtime` is ignored when set in a project’s `.workmux.yaml`. It changes the isolation boundary, so a repository must not be able to select (or downgrade) it via its own config. * **Kata needs Docker.** Kata Containers does not officially support Podman as a container manager ([Kata limitations](https://github.com/kata-containers/kata-containers/blob/main/docs/Limitations.md)), so use `runtime: docker` for the `kata` example above. * **Podman support is local-only.** Other OCI runtimes may work with local Podman on Linux. Remote Podman clients, including all macOS and Windows builds, do not expose `podman run --runtime`. Workmux rejects `oci_runtime` on non-Linux hosts and when `CONTAINER_HOST` or `CONTAINER_CONNECTION` selects a remote service. Other remote Podman configurations are unsupported and may return `unknown flag: --runtime` directly from Podman. * **Apple Container ignores it.** Apple Container manages its own VM and has no `--runtime` concept, so a configured `oci_runtime` is silently omitted there (as are `cap_add`/`security_opt`). This lets one global config target Kata on a Docker host and still run on macOS without erroring. * **Network-deny mode** ([below](#network-restrictions)) configures `iptables` inside the container, which needs a real in-guest kernel. It works under a VM-based runtime like Kata, but may not under a userspace-kernel runtime such as gVisor. **Docker-in-Docker under Kata:** ```yaml sandbox: enabled: true container: runtime: docker oci_runtime: kata cap_add: [ALL] security_opt: - seccomp=unconfined - apparmor=unconfined - systempaths=unconfined ``` `cap_add` and `security_opt` are global-only passthroughs for Docker and Podman. They support an inner Docker daemon under Kata without `--privileged`, which injects host device nodes that conflict with devices in the guest. The values above grant every Linux capability and disable several container-level security controls, while Kata’s guest VM remains the host isolation boundary. These fields are independent of `oci_runtime`. Without a VM-based OCI runtime, permissive values apply to a host-kernel container and weaken the sandbox’s isolation from the host. `security_opt` values such as `no-new-privileges` can instead strengthen confinement. Apple Container silently omits both fields. **Sandbox all panes (not just agent):** ```yaml sandbox: enabled: true target: all ``` ## How it works [Section titled “How it works”](#how-it-works) When you run `workmux add feature-x`, the agent command is wrapped: ```bash # Without sandbox: claude -- "$(cat .workmux/PROMPT-feature-x.md)" # With sandbox (Docker example): docker run --rm -it \ --user 501:20 \ --env HOME=/tmp \ --mount type=bind,source=/path/to/worktree,target=/path/to/worktree \ --mount type=bind,source=/path/to/main/.git,target=/path/to/main/.git,readonly \ --mount type=bind,source=/path/to/main,target=/path/to/main,readonly \ --mount type=bind,source=~/.claude-sandbox.json,target=/tmp/.claude.json \ --mount type=bind,source=~/.claude,target=/tmp/.claude \ --workdir /path/to/worktree \ workmux-sandbox:claude \ sh -c 'claude -- "$(cat .workmux/PROMPT-feature-x.md)"' ``` The exact flags vary by runtime (e.g., Podman adds `--userns=keep-id`, Apple Container uses directory mounts instead of file mounts). ### What’s mounted [Section titled “What’s mounted”](#whats-mounted) | Mount | Access | Purpose | | ------------------------ | ------------ | --------------------------------------------------------------------------- | | Worktree directory | read-write | Source code | | Main worktree | read-only | Symlink resolution (e.g., CLAUDE.md) | | Git common directory | read-only | Git control policy and administrative namespace | | Git objects, refs, logs | read-write | Commits and branch updates | | Current worktree admin | read-write\* | Index, HEAD, merge, and rebase state | | Agent credentials | read-write | Auth and settings (see [Credentials](/guide/sandbox/features/#credentials)) | | `extra_mounts` entries | read-only\* | User-configured paths | | `excluded_files` entries | masked | Shadowed with `/dev/null` so sensitive files are unreadable | \* Git pointer files, per-worktree config, object information, hooks, and nested administrative namespaces remain read-only within writable Git data mounts. Extra mounts are read-only by default. Set `writable: true` to allow writes. Writable mounts that overlap protected Git paths are rejected. This boundary protects Git policy files, not repository programs referenced by that policy. Configured content filters and merge drivers may execute programs from the writable worktree during host Git operations. Docker and Podman use nested bind mounts. Apple Container uses nested mounts with `--read-only-path`. Workmux checks for that capability before startup, so Apple Container builds such as 0.10 that lack it fail closed. Container capabilities that permit mount changes and writable container-engine sockets are incompatible with this boundary and are rejected. ### Git hooks [Section titled “Git hooks”](#git-hooks) The container can execute hooks installed before startup, but cannot modify shared `.git/hooks` files or settings such as `core.hooksPath`. With the default `sandbox.target: agent`, use a regular host pane for hook setup or dependency installation. A host-side [`post_create`](/guide/configuration/#lifecycle-hooks) command is another option. Hook installers run inside the container may fail with `Read-only file system` or `Resource busy`. Ordinary Git operations remain available. For Claude specifically, a separate config file is mounted to `/tmp/.claude.json`. Docker/Podman mount `~/.claude-sandbox.json` directly; Apple Container mounts the `~/.claude-sandbox-config/` directory (since it only supports directory mounts). ### Networking [Section titled “Networking”](#networking) By default, containers have unrestricted network access. To restrict outbound connections to only approved domains, configure [network restrictions](#network-restrictions). When enabled, all outbound HTTPS is routed through a host-resident proxy that enforces a domain allowlist, and iptables rules inside the container block any direct connections. ### Debugging with `sandbox shell` [Section titled “Debugging with sandbox shell”](#debugging-with-sandbox-shell) Start an interactive shell inside a container for debugging: ```bash # Start a new container with the same mounts workmux sandbox shell # Exec into the currently running container for this worktree workmux sandbox shell --exec ``` The `--exec` flag attaches to an existing running container instead of starting a new one. This is useful for inspecting the state of a running agent’s environment. ## Network restrictions [Section titled “Network restrictions”](#network-restrictions) Network restrictions block outbound connections from sandboxed containers, only allowing traffic to domains you explicitly whitelist. This prevents agents from accessing your local network, exfiltrating data to unauthorized services, or making unintended API calls. ### Configuration [Section titled “Configuration”](#configuration-1) Add to global config (`~/.config/workmux/config.yaml`): ```yaml sandbox: enabled: true network: policy: deny allowed_domains: # Claude Code (adjust for your agent) - "api.anthropic.com" - "platform.claude.com" ``` `network` is a global-only setting. If set in a project’s `.workmux.yaml`, it is ignored and a warning is logged. This ensures that project config cannot weaken network restrictions set by the user. The proxy accepts up to 128 concurrent HTTPS connections by default. Set `max_connections` under `network` to adjust the limit for workloads with different connection-pool requirements. A connection that exceeds the limit receives an HTTP 503 response. Domain entries support exact matches (`github.com`) and wildcard prefixes (`*.github.com`). Wildcards match subdomains only, not the base domain itself (e.g., `*.github.com` matches `api.github.com` but not `github.com`). By default, allowed domains that resolve to private/internal IP ranges are still rejected. To reach a trusted VPN-hosted mirror, opt in for one exact host with object syntax: ```yaml sandbox: enabled: true network: policy: deny allowed_domains: - api.anthropic.com - host: artifactory.example.com allow_private_ips: true ``` `allow_private_ips: true` permits RFC1918, CGNAT (`100.64.0.0/10`), and IPv6 ULA destinations for that exact host. It does not allow loopback, link-local, unspecified, multicast, or broadcast destinations. IP literals and wildcard private opt-ins like `host: "*.example.com"` are rejected. ### How it works [Section titled “How it works”](#how-it-works-1) Two layers enforce the restrictions: 1. **iptables firewall** inside the container blocks all direct outbound connections, forcing traffic through a host-resident proxy. 2. **CONNECT proxy** on the host checks each domain against the allowlist and rejects connections to private/internal IPs. This means agents cannot bypass restrictions by ignoring proxy environment variables. Only HTTPS (port 443) to allowed domains gets through. The proxy also rejects connections to private/internal IP ranges by default, so allowed domains cannot be used to reach local network services unless an exact host is explicitly configured with `allow_private_ips: true`. Loopback, link-local, unspecified, multicast, and broadcast destinations are always blocked. Non-HTTPS protocols like `git+ssh` are blocked; use HTTPS git remotes instead. IPv6 is blocked in direct container egress to prevent bypassing the IPv4 firewall. ### Known limitations [Section titled “Known limitations”](#known-limitations) * **Non-HTTP protocols**: Protocols like `git+ssh` are blocked. Use HTTPS git remotes (`git clone https://...`) instead of SSH (`git clone git@...`). * **Podman rootless**: Network restrictions require `CAP_NET_ADMIN` for iptables. On rootless Podman, this may require additional configuration depending on your setup. ## Custom images [Section titled “Custom images”](#custom-images) To add tools or customize the sandbox environment, export the Dockerfile and modify it: ```bash workmux sandbox init-dockerfile # creates Dockerfile.sandbox vim Dockerfile.sandbox # customize docker build -t my-sandbox -f Dockerfile.sandbox . ``` To build the default image locally instead of pulling from the registry: ```bash workmux sandbox build ``` Then set the image in your config: ```yaml sandbox: enabled: true image: my-sandbox ``` A custom image for Codex needs Codex 0.156 or newer, installed from its full release package (`codex-package--unknown-linux-musl.tar.gz`) rather than the bare `codex` binary, which lacks helpers such as `codex-code-mode-host`. Workmux starts sandboxed Codex with `--no-daemon`, which older versions reject (see [Agent flags](/guide/sandbox/features/#agent-flags)). ## Security: hooks in sandbox [Section titled “Security: hooks in sandbox”](#security-hooks-in-sandbox) Pre-merge and pre-remove hooks are always skipped for RPC-triggered merges (`--no-verify --no-hooks` is forced by the host). This prevents a compromised guest from injecting malicious hooks via `.workmux.yaml` and triggering them on the host. Similarly, `SpawnAgent` RPC forces `--no-hooks` to skip post-create hooks. # Shared features > Features shared across container and Lima sandbox backends These features work with both the container and Lima sandbox backends. ## Extra mounts [Section titled “Extra mounts”](#extra-mounts) The `extra_mounts` option lets you mount additional host directories into the sandbox. Mounts are read-only by default for security. `extra_mounts` is a **global-only** setting. If set in a project’s `.workmux.yaml`, it is ignored and a warning is logged. This prevents a malicious repository from mounting arbitrary host paths into the sandbox. Each entry can be a simple path string (read-only, mirrored into the guest at the same path) or a detailed spec with `host_path`, optional `guest_path`, and optional `writable` flag. \~/.config/workmux/config.yaml ```yaml sandbox: extra_mounts: # Simple: read-only, same path in guest - ~/Screenshots # Detailed: writable with custom guest path - host_path: ~/shared-data guest_path: /mnt/shared writable: true ``` Paths starting with `~` are expanded to the user’s home directory. When `guest_path` is omitted, the expanded host path is used as the guest mount point. **Note:** For the Lima backend, mount changes only take effect when the VM is created. To apply changes to an existing VM, recreate it with `workmux sandbox prune`. **Note:** Apple Container only supports directory mounts. Individual file paths in `extra_mounts` will fail with Apple Container. ## Host command proxying [Section titled “Host command proxying”](#host-command-proxying) The `host_commands` option lets agents inside the sandbox run specific commands on the host machine. It’s useful for project toolchain commands (build tools, task runners, linters) that are available on the host but would be slow or complex to install inside the sandbox. Running builds on the host is also faster since both backends use virtualization on macOS, and filesystem I/O through mount sharing adds overhead for build-heavy workloads. Evaluate your threat model Host command proxying is primarily a convenience feature that exists so you don’t have to install your entire build toolchain inside each container or VM. It should not necessarily be expected to provide airtight confinement. Any allowed command can execute code from project files. For example, an agent could write a malicious `justfile` and run `just`. The filesystem sandbox blocks access to host secrets and restricts writes, but proxied commands still have network access and run on the host. If your threat model requires strict isolation with no host execution, don’t enable `host_commands`. \~/.config/workmux/config.yaml ```yaml sandbox: host_commands: ["just", "cargo", "npm"] ``` `host_commands` is only read from your global config. If set in a project’s `.workmux.yaml`, it is ignored and a warning is logged. This ensures that only you control which commands get host access, not the projects you clone. When configured, workmux creates shim scripts inside the sandbox that transparently forward these commands to the host via RPC. The host runs them in the project’s toolchain environment (Devbox/Nix if available), streams stdout/stderr back to the sandbox in real-time, and returns the exit code. Some commands are built-in and always available as host-exec shims without configuration (e.g., `afplay` for sound notifications). Only commands listed in `host_commands` or built-in are allowed; there is no wildcard or auto-discovery. For Lima VMs: This is complementary to the toolchain integration (`toolchain: auto`). The toolchain wraps the *agent command* itself (e.g., `claude`), while `host_commands` lets the agent invoke *other* tools that exist on the host. For example, an agent running inside the VM could run `just check` and the command would execute on the host with full access to the project’s Devbox environment. ### Security model [Section titled “Security model”](#security-model) Host-exec applies several layers of defense to limit what a compromised agent inside the sandbox can do: * **Allowed commands**: Only commands explicitly listed in `host_commands` (or built-in) can be executed. This is enforced on the host side. * **Strict command names**: Command names must match `^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$`. No path separators, shell metacharacters, or special names (`.`, `..`) are accepted. * **No shell injection**: When toolchain wrapping is active (devbox/nix), command arguments are passed as positional parameters to bash (`"$@"`), never interpolated into a shell string. Without toolchain wrapping, commands are executed directly via the OS with no shell involved. * **Environment isolation**: Child processes run with a sanitized environment. Only essential variables (`PATH`, `HOME`, `TERM`, etc.) are passed through. Host secrets like API keys are not inherited. `PATH` is normalized to absolute entries only to prevent relative-path hijacking. * **Filesystem sandbox**: On macOS, child processes run under `sandbox-exec` (Seatbelt), which denies access to sensitive directories (including `~/.ssh`, `~/.aws`, `~/.gnupg`, `~/.kube`, `~/.docker`, `~/.claude`, `~/.config/gh`, `~/.password-store`, keychains, browser data) and credential files (including `~/.gitconfig`, `~/.vault-token`, shell histories), and denies writes to `$HOME` except toolchain caches (`.cache`, `.cargo`, `.rustup`, `.npm`). On Linux, `bwrap` (Bubblewrap) provides similar isolation with a read-only root filesystem, tmpfs over secret directories, and a writable worktree bind mount. If `bwrap` is not installed on Linux, host-exec commands are refused (fail closed). * **Global-only config**: `host_commands` is only read from global config (`~/.config/workmux/config.yaml`). Project-level `.workmux.yaml` cannot set it. A warning is logged if it tries. * **Global-only RPC host**: `rpc_host` is only read from global config. A malicious project config cannot redirect RPC traffic to attacker infrastructure. * **Worktree-locked**: All commands execute with the project worktree as the working directory. **Known limitations**: * Allowlisted commands that read project files (build tools like `just`, `cargo`, `make`) effectively act as code interpreters. A compromised agent can write a malicious `justfile` and then invoke `just`. The filesystem sandbox mitigates this by blocking access to host secrets and restricting writes, but the child process still has network access (required for package managers). * `sandbox-exec` is deprecated on macOS but remains functional. Apple has not announced a replacement for CLI tools. * On Linux, `bwrap` must be installed separately (`apt install bubblewrap`). Without it, host-exec commands are refused. * Setting `sandbox.dangerously_allow_unsandboxed_host_exec: true` in your global config skips the filesystem sandbox entirely on both macOS and Linux. Only environment sanitization is applied. This is a global-only setting; project config cannot enable it. ## Sound notifications [Section titled “Sound notifications”](#sound-notifications) Claude Code hooks often use `afplay` to play notification sounds (e.g., when an agent finishes). Since `afplay` is a macOS-only binary, it doesn’t exist inside the Linux guest. workmux includes `afplay` as a built-in host-exec shim that forwards sound playback to the host. This works with both Lima and container backends. This is transparent: when a hook runs `afplay /System/Library/Sounds/Glass.aiff` inside the sandbox, the shim runs `afplay` on the host via the host-exec RPC mechanism. No configuration is needed. ## Clipboard proxy [Section titled “Clipboard proxy”](#clipboard-proxy) Image pasting via Ctrl+V works inside the sandbox. workmux provides built-in shims for `wl-paste` and `xclip` that transparently proxy clipboard reads to the host. No configuration is needed. Currently only `image/png` is supported. Text clipboard works natively through the terminal and does not need proxying. ## Git identity [Section titled “Git identity”](#git-identity) The sandbox does not mount your `~/.gitconfig` because it may contain credential helpers, shell aliases, or other sensitive configuration. Instead, workmux automatically extracts your `user.name` and `user.email` from the host’s git config and injects them into the sandbox via environment variables (`GIT_CONFIG_COUNT`/`GIT_CONFIG_KEY_*`/`GIT_CONFIG_VALUE_*`). This means git commits inside the sandbox use your identity without exposing the rest of your git config. The extraction respects all git config scopes (system, global, conditional includes) by running from the worktree directory, so directory-specific identities work correctly. No configuration is needed. If the host has no `user.name` or `user.email` configured, the injection is silently skipped. ## Agent flags [Section titled “Agent flags”](#agent-flags) Inside a sandbox the sandbox is the security boundary, so workmux starts agents without their own permission prompts: Claude with `--dangerously-skip-permissions`, Codex and Gemini with `--yolo`, and other agents with their equivalent. Flags your agent command already sets are not added a second time. Codex also gets `--no-daemon`. The sandbox mounts the host’s `~/.codex`, where Codex installs and tracks its shared background server, but a sandboxed Codex can’t reach a server running outside the sandbox. Without the flag, it fails to start once Codex on the host has installed the server (“daemon executable not found”), or installs a server of its own into the host’s `~/.codex`. Codex also gets `--dangerously-bypass-hook-trust`. Codex otherwise asks you to review every new or changed hook before it runs, including the hooks workmux installs for [status tracking](/guide/status-tracking/), and the sandbox path of `~/.codex/hooks.json` differs from the host’s, so approvals given on the host don’t apply. Hooks run inside the sandbox, the same as any command the agent runs with `--yolo`, so the review adds no protection there. Hooks you disabled in Codex stay disabled. The flag applies to that launch only and records no approval. `--no-daemon` needs Codex 0.156 or newer. The workmux image installs the latest release. A custom image (`sandbox.image`) or a Lima VM with an older Codex fails to start Codex with “unexpected argument ‘—no-daemon’”: update Codex in the image, or recreate the VM with `workmux sandbox prune`. ## Credentials [Section titled “Credentials”](#credentials) Both sandbox backends mount agent-specific credential directories from the host. The mounted directory depends on the configured `agent`: | Agent | Host directory | Container mount | Lima mount | | ---------- | ---------------------------- | ------------------------------- | -------------------------------- | | `claude` | `~/.claude/` | `/tmp/.claude/` | `$HOME/.claude/` | | `copilot` | `~/.copilot/` | `/tmp/.copilot/` | `$HOME/.copilot/` | | `gemini` | `~/.gemini/` | `/tmp/.gemini/` | `$HOME/.gemini/` | | `agy` | `~/.gemini/antigravity-cli/` | `/tmp/.gemini/antigravity-cli/` | `$HOME/.gemini/antigravity-cli/` | | `codex` | `~/.codex/` | `/home/user/.codex/` | `$HOME/.codex/` | | `opencode` | `~/.local/share/opencode/` | `/tmp/.local/share/opencode/` | `$HOME/.local/share/opencode/` | | `pi` | `~/.pi/agent/` | `/tmp/.pi/agent/` | `$HOME/.pi/agent/` | | `omp` | `~/.omp/agent/` | `/tmp/.omp/agent/` | `$HOME/.omp/agent/` | Other agents get no config directory mount. OpenCode’s global config directory (`~/.config/opencode/`) is also mounted read-only, providing access to `opencode.json`, plugins, and global MCP definitions. Key behaviors: * Gemini, Codex, OpenCode, and OMP store credentials in files. If you’ve authenticated on the host, the sandbox automatically has access. * Claude stores auth in macOS Keychain, which isn’t accessible from containers or Linux VMs. You need to authenticate Claude separately inside the sandbox. * Authentication done inside the sandbox writes back to the host directory. Credentials persist across sandbox recreations. * The credential mount is determined by the `agent` setting. Switching agents requires recreating the sandbox (Lima) or starting a new container. * For `pi`, the entire `~/.pi/agent/` is shared except `bin/`. Pi auto-downloads platform-specific `fd` and `rg` binaries into `bin/`, so a Linux sandbox would otherwise overwrite a macOS host’s Mach-O binaries through the bind mount. Workmux overlays a per-sandbox, arch-keyed directory on `bin/` to keep host and guest binaries separate. * OMP uses file-backed state and credentials mounted from `~/.omp/agent/`. The container backend also uses a separate config file for Claude, mounted to `/tmp/.claude.json` inside the container. Docker/Podman use `~/.claude-sandbox.json` (file mount); Apple Container uses `~/.claude-sandbox-config/claude.json` (directory mount, since Apple Container only supports directory mounts). ### Custom config directory [Section titled “Custom config directory”](#custom-config-directory) By default, each agent’s standard config directory is mounted into the sandbox (see table above). To use a separate directory, keeping sandbox config isolated from the host: \~/.config/workmux/config.yaml ```yaml sandbox: agent_config_dir: ~/sandbox-config/{agent} ``` The `{agent}` placeholder is replaced with the active agent name (e.g. `claude`, `gemini`). The directory is auto-created if it doesn’t exist. This is useful when you want different MCP servers, project configs, or settings for sandboxed sessions without affecting your host configuration. `agent_config_dir` is a **global-only** setting. ## Coordinator agents [Section titled “Coordinator agents”](#coordinator-agents) What is a coordinator agent? A coordinator agent sits on the main branch, plans work, and delegates tasks to worktree agents via `/worktree`. See [Workflows](/guide/workflows/#from-an-ongoing-agent-session) for more on this pattern. Coordinator agents can run inside a sandbox using `workmux sandbox agent`. When the coordinator calls `workmux add` from inside the sandbox, the command is automatically routed through RPC to the host, where sub-agents are created normally (and sandboxed if the project config enables it). Alternatively, coordinators can run on the host (unsandboxed) and only sandbox leaf agents. ## RPC protocol [Section titled “RPC protocol”](#rpc-protocol) The supervisor and guest communicate via JSON-lines over TCP. Each request is a single JSON object on one line. **Supported requests:** * `SetStatus` - updates the tmux pane status icon (working/waiting/done/clear) * `SetTitle` - renames the tmux window * `Heartbeat` - health check, returns Ok * `SpawnAgent` - runs `workmux add` on the host to create a new worktree and pane * `Exec` - runs a command on the host and streams stdout/stderr back (used by host-exec shims, including built-in `afplay`) * `Merge` - runs `workmux merge` on the host with hooks disabled * `Remove` - asks the local machine to remove a workspace on a [remote server](/guide/remote/), without hooks; refused locally, where `pre_remove` hooks would run on the host * `ClipboardRead` - reads the host clipboard and writes image data to the shared worktree filesystem (used by `wl-paste`/`xclip` shims) Requests are authenticated with a per-session token passed via the `WM_RPC_TOKEN` environment variable. ## Troubleshooting [Section titled “Troubleshooting”](#troubleshooting) ### Agent can’t find credentials [Section titled “Agent can’t find credentials”](#agent-cant-find-credentials) Claude stores auth in macOS Keychain, so it must authenticate separately inside containers and VMs. Other agents (Gemini, Codex, OpenCode, OMP) use file-based credentials that are shared with the host automatically. If credentials are missing, start a shell in the sandbox with `workmux sandbox shell` and run the agent to trigger authentication. Credentials written inside the sandbox persist to the host. ### Debugging blocked requests [Section titled “Debugging blocked requests”](#debugging-blocked-requests) Network proxy rejections are logged on the host at `$XDG_STATE_HOME/workmux/workmux.log`, or `~/.local/state/workmux/workmux.log` by default. To watch rejections while reproducing an issue: ```bash tail -f ~/.local/state/workmux/workmux.log | grep rejected ``` Rejected entries include the denied hostname. Add any expected hosts to your sandbox’s `network.domains` list and retry. ## Installing local builds [Section titled “Installing local builds”](#installing-local-builds) During development, the macOS host binary cannot run inside Linux containers or VMs. Use `install-dev` to cross-compile and install your local workmux build: ```bash # First time: install prerequisites rustup target add aarch64-unknown-linux-gnu brew install messense/macos-cross-toolchains/aarch64-unknown-linux-gnu # Cross-compile and install into containers and running VMs workmux sandbox install-dev # After code changes, rebuild and reinstall workmux sandbox install-dev # Use --release for optimized builds workmux sandbox install-dev --release # Skip rebuild if binary hasn't changed workmux sandbox install-dev --skip-build ``` For containers, this builds a thin overlay image (`FROM ` + `COPY workmux`) on top of the configured sandbox image, replacing it in-place. For Lima VMs, the binary is installed to `~/.local/bin/workmux` inside each running VM. # Lima VM backend > Run agents in isolated Lima virtual machines workmux can use [Lima](https://lima-vm.io/) VMs for sandboxing, where each project runs in its own virtual machine with a separate kernel. ## Setup [Section titled “Setup”](#setup) ### 1. Install Lima [Section titled “1. Install Lima”](#1-install-lima) ```bash brew install lima ``` ### 2. Enable in config [Section titled “2. Enable in config”](#2-enable-in-config) ```yaml # ~/.config/workmux/config.yaml or .workmux.yaml sandbox: enabled: true backend: lima ``` Lima uses broad writable host mounts. On first use, workmux explains that Lima cannot isolate Git control files from writable Git data and asks for explicit acceptance. For unattended startup, set the acceptance in trusted config: ```yaml sandbox: backend: lima lima: accept_reduced_git_metadata_isolation: true ``` Docker, Podman, and Apple Container enforce a stronger boundary around host Git control files. ## Configuration [Section titled “Configuration”](#configuration) Lima-specific settings are nested under `sandbox.lima`: ```yaml sandbox: enabled: true backend: lima env_passthrough: - GITHUB_TOKEN - ANTHROPIC_API_KEY env: GH_TOKEN: ghp_xxxxxxxxxxxx lima: isolation: project # default: one VM per git repository cpus: 8 memory: 8GiB provision: | sudo apt-get install -y ripgrep fd-find jq ``` | Option | Default | Description | | -------------------------------------------- | ------------------ | --------------------------------------------------------------------------------------------------------------------------- | | `backend` | `container` | Set to `lima` for VM sandboxing | | `lima.isolation` | `project` | `project` (one VM per repo) or `shared` (single global VM) | | `lima.projects_dir` | - | Required for `shared` isolation: parent directory of all projects | | `image` | Debian 13 | Custom qcow2 image URL or `file://` path. **Global config only.** | | `lima.skip_default_provision` | `false` | Skip built-in provisioning (system deps + tool install) | | `lima.accept_reduced_git_metadata_isolation` | `false` | Accept Lima’s reduced Git metadata guarantee without an interactive prompt | | `lima.cpus` | `4` | Number of CPUs for Lima VMs | | `lima.memory` | `4GiB` | Memory for Lima VMs | | `lima.disk` | `100GiB` | Disk size for Lima VMs | | `lima.provision` | - | Custom user-mode shell script run once at VM creation after built-in steps | | `toolchain` | `auto` | Toolchain mode: `auto` (detect devbox.json/flake.nix), `off`, `devbox`, or `flake` | | `host_commands` | `[]` | Commands to proxy from guest to host via RPC (see [shared features](/guide/sandbox/features/#host-command-proxying)) | | `env_passthrough` | `["GITHUB_TOKEN"]` | Environment variables to pass through to the VM. **Global config only.** | | `env` | `{}` | Environment variables to set with explicit values (unlike `env_passthrough` which reads from host). **Global config only.** | | `extra_mounts` | `[]` | Additional host paths to mount (see [shared features](/guide/sandbox/features/#extra-mounts)). **Global config only.** | VM resource and provisioning settings (`isolation`, `projects_dir`, `cpus`, `memory`, `disk`, `provision`, `skip_default_provision`) are nested under `lima`. Settings shared by both backends (`toolchain`, `host_commands`, `env_passthrough`, `env`, `image`, `target`) remain at the `sandbox` level. Container-specific settings (`runtime`) are nested under `container`. ## Git metadata boundary [Section titled “Git metadata boundary”](#git-metadata-boundary) Lima mounts project directories writable into a VM whose guest user can gain root privileges. Lima’s mount model cannot make selected Git policy files read-only while leaving refs, objects, indexes, and worktree files writable with a boundary that guest root cannot undo. The guest can therefore modify common Git config, hooks, linked-worktree pointers, config includes, and submodule Git metadata that host Git may later consume. Configured content filters, merge drivers, and credential helpers can execute as the host user during those Git operations. Workmux requires explicit acceptance once per Lima VM. The acknowledgement lives in the host-only `~/.local/state/workmux/lima-acknowledgements/git-metadata-isolation-v1/` directory, outside paths mounted into the guest. Non-interactive startup fails unless `lima.accept_reduced_git_metadata_isolation` is true. Use Docker, Podman, or Apple Container when host Git metadata must be protected from the guest. ## How it works [Section titled “How it works”](#how-it-works) When using the Lima backend, each sandboxed pane runs a supervisor process (`workmux sandbox run`) that: 1. Ensures the Lima VM is running (creates it on first use) 2. Starts a TCP RPC server on a random port 3. Runs the agent command inside the VM via `limactl shell` 4. Handles RPC requests from the guest workmux binary The guest VM connects back to the host via `host.lima.internal` (Lima’s built-in hostname) to send RPC requests like status updates and agent spawning. ### VM naming scheme [Section titled “VM naming scheme”](#vm-naming-scheme) VMs are named deterministically based on the isolation level: * **Project isolation** (default): `wm--` (e.g., `wm-myproject-a1b2c3d4`). The project name (up to 18 characters) is included for readability in `limactl list`. * **Shared isolation**: `wm-` (e.g., `wm-5f6g7h8i`). A single global VM is used for all projects. ### Auto-start behavior [Section titled “Auto-start behavior”](#auto-start-behavior) VMs are created on first use and started automatically when needed. If a VM already exists but is stopped, workmux restarts it. You don’t need to manage VM lifecycle manually during normal use. ## Provisioning [Section titled “Provisioning”](#provisioning) ### Default provisioning [Section titled “Default provisioning”](#default-provisioning) When a VM is first created, workmux runs two built-in provisioning steps: **System provision** (as root): * Installs `curl`, `ca-certificates`, `git`, `xz-utils` **User provision:** * Installs the configured agent CLI (based on the `agent` setting) * Installs [workmux](https://github.com/raine/workmux) * Installs [Nix](https://nixos.org/) and [Devbox](https://www.jetify.com/devbox) (only when the project has `devbox.json` or `flake.nix`, or `toolchain` is explicitly set to `devbox` or `flake`) The agent CLI installed depends on your `agent` configuration: | Agent | What gets installed | | ------------------ | ------------------------------------------ | | `claude` (default) | Claude Code CLI via `claude.ai/install.sh` | | `codex` | Codex package from GitHub releases | | `gemini` | Node.js + Gemini CLI via npm | | `opencode` | OpenCode binary via `opencode.ai/install` | | `pi` | Pi CLI via npm | | `omp` | Oh My Pi CLI via Bun + Python | Codex needs the whole Codex package, which VMs created by older workmux versions don’t have. Codex also needs to be 0.156 or newer (see [Agent flags](/guide/sandbox/features/#agent-flags)). Recreate such a VM with `workmux sandbox prune`. Changing the `agent` setting after VM creation has no effect on existing VMs. Recreate the VM with `workmux sandbox prune` to provision with a different agent. ### Authentication [Section titled “Authentication”](#authentication) Agent credentials are shared between the host and VM. See [Credentials](/guide/sandbox/features/#credentials) for the per-agent mount table. **Lima-specific notes:** * Claude stores auth in macOS Keychain, which is not accessible from the Linux VM. You need to authenticate Claude separately inside the VM. * Gemini, Codex, and OpenCode use file-based credentials that work automatically if you’ve authenticated on the host. * workmux seeds a minimal `~/.claude.json` inside the VM with onboarding marked as complete. This is stored per-VM in `~/.local/state/workmux/lima//` and prevents the onboarding flow from triggering on each VM creation. * The credential mount is determined by the `agent` setting at VM creation time. If you switch agents, recreate the VM with `workmux sandbox prune` to get the correct mount. ### Custom provisioning [Section titled “Custom provisioning”](#custom-provisioning) The `provision` field accepts a shell script that runs as a third provisioning step during VM creation, after the built-in steps. Use it to customize the VM environment for your project. The script runs in `user` mode. Use `sudo` for system-level commands. ```yaml sandbox: backend: lima lima: provision: | # Install extra CLI tools sudo apt-get install -y ripgrep fd-find jq # Install Node.js via nvm curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash export NVM_DIR="$HOME/.nvm" . "$NVM_DIR/nvm.sh" nvm install 22 ``` **Important:** * Provisioning only runs when the VM is first created. Changing the `agent` setting or provision script has no effect on existing VMs. Recreate the VM with `workmux sandbox prune` to apply changes. * With `lima.isolation: shared`, only the first project to create the VM gets its agent installed and provision script run. Use `lima.isolation: project` (default) if different projects use different agents or need different provisioning. * The built-in system step runs `apt-get update` before the custom script, so package lists are already available. ### Custom images [Section titled “Custom images”](#custom-images) You can use a pre-built qcow2 image to skip provisioning entirely, reducing VM creation time from minutes to seconds. This is useful when you want every VM to start from an identical, known-good state. ```yaml sandbox: backend: lima image: file:///Users/me/.lima/images/workmux-golden.qcow2 lima: skip_default_provision: true ``` When `image` is set, it replaces the default Debian 13 genericcloud image. The value can be a `file://` path to a local qcow2 image or an HTTP(S) URL. When `skip_default_provision` is true, the built-in provisioning steps are skipped: * System provision (apt-get install of curl, ca-certificates, git) * User provision (agent CLI, workmux, Nix/Devbox) Custom `provision` scripts still run even when `skip_default_provision` is true, so you can layer additional setup on top of a pre-built image. #### Creating a pre-built image [Section titled “Creating a pre-built image”](#creating-a-pre-built-image) 1. Create a VM with default provisioning and let it fully provision: ```yaml sandbox: backend: lima lima: provision: | sudo apt-get install -y ripgrep fd-find jq ``` 2. After the VM is running, stop it: ```bash limactl stop wm-yourproject-abc12345 ``` 3. Export the disk image (flattens base + changes into a single file): ```bash mkdir -p ~/.lima/images qemu-img convert -O qcow2 \ ~/.lima/wm-yourproject-abc12345/diffdisk \ ~/.lima/images/workmux-golden.qcow2 ``` 4. Update your config to use the pre-built image: ```yaml sandbox: backend: lima image: file:///Users/me/.lima/images/workmux-golden.qcow2 lima: skip_default_provision: true ``` New VMs will now boot from the snapshot with everything pre-installed. ## Nix and Devbox toolchain [Section titled “Nix and Devbox toolchain”](#nix-and-devbox-toolchain) The Lima backend has built-in support for [Nix](https://nixos.org/) and [Devbox](https://www.jetify.com/devbox) to provide declarative, cached toolchain management inside VMs. For the container backend, use a [custom Dockerfile](/guide/sandbox/container/#custom-images) to install project-specific tools, or use [`host_commands`](/guide/sandbox/features/#host-command-proxying) to proxy commands from the container to the host’s toolchain environment. By default (`toolchain: auto`), workmux checks for `devbox.json` or `flake.nix` in the project root and wraps agent commands in the appropriate environment: * **Devbox**: Commands run via `devbox run -- ` * **Nix flakes**: Commands run via `nix develop --command bash -c ''` If both `devbox.json` and `flake.nix` exist, Devbox takes priority. ### Example: Rust project with Devbox [Section titled “Example: Rust project with Devbox”](#example-rust-project-with-devbox) Add a `devbox.json` to your project root: ```json { "packages": ["rustc@latest", "cargo@latest", "just@latest", "ripgrep@latest"] } ``` When workmux creates a sandbox, the agent automatically has access to `rustc`, `cargo`, `just`, and `rg` without any provisioning scripts. ### Example: Node.js project with Devbox [Section titled “Example: Node.js project with Devbox”](#example-nodejs-project-with-devbox) ```json { "packages": ["nodejs@22", "yarn@latest"], "shell": { "init_hook": ["echo 'Node.js environment ready'"] } } ``` ### Disabling toolchain integration [Section titled “Disabling toolchain integration”](#disabling-toolchain-integration) To disable auto-detection (e.g., if your project has a `devbox.json` that should not be used in the sandbox): ```yaml sandbox: backend: lima toolchain: off ``` This skips Nix and Devbox installation during provisioning and disables runtime toolchain wrapping. To force a specific toolchain mode regardless of which config files exist: ```yaml sandbox: backend: lima toolchain: devbox # or: flake ``` ### How it works [Section titled “How it works”](#how-it-works-1) Nix and Devbox are installed during VM provisioning only when needed (when `devbox.json` or `flake.nix` exists in the project, or `toolchain` is explicitly set). Tools declared in these files are downloaded as pre-built binaries from the Nix binary cache, so no compilation is needed. The `/nix/store` persists inside the VM across sessions, so subsequent activations are instant. If the VM is pruned with `workmux sandbox prune`, packages will be re-downloaded on next use. ### Toolchain vs provisioning [Section titled “Toolchain vs provisioning”](#toolchain-vs-provisioning) Use **toolchain** (`devbox.json`/`flake.nix`) for project-specific development tools like compilers, linters, and build tools. Changes take effect on the next sandboxed session without recreating the VM. Use **provisioning** for one-time VM setup like system packages, shell configuration, or services that need to run as root. Provisioning only runs on VM creation. ## VM management [Section titled “VM management”](#vm-management) ### Cleaning up unused VMs [Section titled “Cleaning up unused VMs”](#cleaning-up-unused-vms) Use the `prune` command to delete unused Lima VMs created by workmux: ```bash workmux sandbox prune ``` This command: * Lists all Lima VMs with the `wm-` prefix (workmux VMs) * Shows details for each VM: name, status, size, age, and last accessed time * Displays total disk space used * Prompts for confirmation before deletion **Force deletion without confirmation:** ```bash workmux sandbox prune --force ``` **Example output:** ```plaintext Found 2 workmux Lima VM(s): 1. wm-myproject-bbeb2cbf (Running) Age: 2 hours ago Last accessed: 5 minutes ago 2. wm-another-proj-d1370a2a (Stopped) Age: 1 day ago Last accessed: 1 day ago Delete all these VMs? [y/N] ``` Lima VMs are stored in `~/.lima//`. ### Stopping VMs [Section titled “Stopping VMs”](#stopping-vms) When using the Lima backend, you can stop running VMs to free up system resources: ```bash # Interactive mode - shows list of running VMs workmux sandbox stop # Stop a specific VM workmux sandbox stop wm-myproject-abc12345 # Stop all workmux VMs workmux sandbox stop --all # Skip confirmation (useful for scripts) workmux sandbox stop --all --yes ``` This is useful when you want to: * Free up CPU and memory resources * Reduce battery usage on laptops * Clean up after finishing work The VMs will automatically restart when needed for new worktrees. # Session mode > Create worktrees in their own tmux sessions instead of windows By default, workmux creates tmux **windows** within your current session. With session mode, each worktree gets its own **tmux session** instead. This is useful when you want each worktree to have multiple windows, or when you prefer the isolation of separate sessions (each with its own window list, history, and layout). ## Enabling session mode [Section titled “Enabling session mode”](#enabling-session-mode) Per-project via config: .workmux.yaml ```yaml mode: session ``` Globally via config: \~/.config/workmux/config.yaml ```yaml mode: session ``` Or per-command via flag: ```bash workmux add feature-branch --mode session workmux open feature-branch --mode window ``` `--mode` overrides the config for the current command. This lets you use window mode by default but create individual worktrees as sessions when needed, or temporarily reopen a session-mode worktree as a window. `--session` is shorthand for `--mode session`. ## How it works [Section titled “How it works”](#how-it-works) * **Persistence**: The mode is stored per-worktree in git config. Once a worktree is created with session mode, `open`, `close`, `remove`, and `merge` automatically use the correct mode. * **Navigation**: `workmux add` switches your client to the new session. When a session closes, clients still viewing it return to their previous sessions. For an in-session `merge`, the merge target’s managed session takes precedence when available; for `remove`, the main branch’s managed session takes precedence. A configured [`default_session`](#returning-to-a-default-session) is used when no managed session is available. Clients already viewing other sessions stay put. If preferred navigation is unavailable or cannot be safely targeted, tmux chooses another session. Closing the last session detaches its clients. ## Returning to a default session [Section titled “Returning to a default session”](#returning-to-a-default-session) By default a client viewing a closing session returns to whichever session it was in previously. Set `default_session` to name a session to prefer instead: .workmux.yaml ```yaml mode: session default_session: main ``` `close`, `remove` and `merge` then send clients to the `main` session rather than to whatever each was viewing before. A managed session for the destination branch still wins, so this only applies where tmux would otherwise fall back to the previous session. The value is a literal tmux session name, so `window_prefix` is not applied and it can name a session workmux does not manage. If no session matches it exactly, clients fall back to their previous sessions as before. ## Multiple windows per session [Section titled “Multiple windows per session”](#multiple-windows-per-session) Use the `windows` config to create multiple windows in each session. Each window can have its own pane layout. This is mutually exclusive with the top-level `panes` config. ```yaml mode: session windows: - name: editor panes: - command: focus: true - split: horizontal size: 20 - name: tests panes: - command: just test --watch - panes: - command: tail -f app.log ``` Each window supports: | Option | Description | Default | | ------- | ------------------------------------------------------ | ------------ | | `name` | Window name (if omitted, tmux auto-names from command) | Auto | | `panes` | Pane layout (same syntax as top-level `panes`) | Single shell | Named windows keep their name permanently. Unnamed windows use tmux’s automatic naming based on the running command. `focus: true` works across windows: the last pane with focus set determines which window is active when the session opens. ## Limitations [Section titled “Limitations”](#limitations) * **tmux only**: Session mode is only supported for the tmux backend. WezTerm, kitty, and Zellij do not support sessions. * **No duplicates**: Unlike window mode which supports opening multiple windows for the same worktree (with `-2`, `-3` suffixes), session mode creates one session per worktree. # Sidebar > A persistent agent status sidebar for tmux windows and Zellij tabs The sidebar provides an always-visible agent overview pinned to the left or top edge of every tmux window or Zellij tab. Unlike the dashboard, which is a full-screen TUI you open on demand, the sidebar stays on screen while you work. ![workmux sidebar](/_astro/sidebar.CKTUC2Rz_Z28KwE7.webp) The sidebar pinned to the left of a tmux window, beside an agent ## Setup [Section titled “Setup”](#setup) Prerequisites The sidebar requires [status tracking hooks](/guide/status-tracking/) and either tmux or the experimental Zellij backend. Toggle the sidebar with: ```bash workmux sidebar # All sessions (default) workmux sidebar --session # Current session only, or opt out of global mode workmux sidebar --position top # Override configured placement for this toggle ``` By default, the sidebar appears in all existing and newly created tmux windows across all sessions. Use `--session` to scope it to the current session only, leaving other sessions untouched. Use `--position left` or `--position top` to override the configured placement when enabling the sidebar. Running the command again disables it. When the global sidebar is active, `workmux sidebar --session` hides it in the current tmux session only. Run it again to show the sidebar in that session again without affecting other sessions. On the experimental Zellij backend, the sidebar covers every tab in the current Zellij session. See [Zellij sidebar](/guide/zellij/#sidebar). Optionally, add a tmux binding for quick access: ```bash bind C-t run-shell "workmux sidebar" ``` ## What it shows [Section titled “What it shows”](#what-it-shows) Each agent is displayed as a tile showing: * Status icon with spinner animation (working/waiting/done) * Worktree name and elapsed time since last status change * Project name and git diff stats (committed + uncommitted lines) * Optional pull request number and check status for the current branch * Agent task description The exact layout, styling, and per-agent icons are fully customizable; see [Customization](/guide/sidebar/customization/). ## Configuration [Section titled “Configuration”](#configuration) Configure the sidebar in your global `~/.config/workmux/config.yaml` or project `.workmux.yaml`: ```yaml # Shared by the dashboard and sidebar; defaults to one hour. stale_after: 5h # integer seconds or a duration such as 90m or 5h sidebar: # Position: "left" (default) or "top" position: left # Left sidebar width: absolute columns or percentage of terminal width width: 40 # absolute columns # width: "15%" # percentage of terminal width # Layout mode for the left sidebar: "compact" or "tiles" (default) layout: tiles # Enter focuses the pane by default. Use "select" to show its window while # keeping focus in the sidebar. enter_action: focus # Dim stale agents (default: true; uses the shared stale_after threshold) dim_stale: true # Row ordering: "recency" (default), "priority" or "window" sort: recency # Group agents into labeled sections: "project" or "session". Unset by # default, which keeps one flat list without headers group_by: project # While grouped, fold each group's stale agents behind a toggle # (default: true) collapse_stale: true ``` For a horizontal top bar: ```yaml sidebar: position: top # Top bar height in rows height: 3 horizontal: item_width: 24 # horizontal chip width in columns templates: horizontal: - "{status_icon} {primary} {pane_suffix} {fill} {elapsed}" - "{secondary} {fill} {git_stats}" - "{pane_title}" ``` ![workmux sidebar as a horizontal top bar](/_astro/sidebar-top-bar.xIvRnHrZ_Z2vyFr3.webp) The horizontal top bar, one chip per agent across three rows Width defaults to 10% of terminal width, clamped between 25 and 50 columns. When set explicitly, the clamp is removed (minimum 1 column). Widths above 80 columns use the default width so tmux pane expansion recovers automatically. Height only applies to `position: top`; set it as a row count for the number of horizontal lines you want to show. Horizontal item width defaults to 24 columns and is clamped between 12 and 80. Position changes take effect the next time you toggle the sidebar off and on. Use `workmux sidebar --position top` or `--position left` to override the configured placement for that toggle. ## Layout modes [Section titled “Layout modes”](#layout-modes) The left sidebar supports two layout modes, toggled with `v` in the sidebar pane: * **Tiles** (default): variable-height cards with status stripe * **Compact**: single line per agent ![Tile layout, one flat list](/_astro/sidebar-tiles.B9PCx0Iu_ZIljLK.webp) Tile layout, a card per agent, with stale ones dimmed Tiles show a muted `↓ N more` footer when agents remain below the visible area. The count includes only hidden agents, not agents above the viewport. The footer is not selectable and disappears when the final agent is visible. On very short sidebars, showing the selected tile takes priority over the footer. Your preference is persisted across multiplexer restarts. The top bar always uses a horizontal chip layout, so `v` has no effect there. Horizontal templates render as many configured lines as the current height allows. ## Ordering [Section titled “Ordering”](#ordering) `sort` decides the order agents appear in: * `recency` (default): most recent status change first, sleeping agents last. * `priority`: agents needing attention first, in the order waiting, done, working, unknown, stale or interrupted, then sleeping. Recent activity breaks ties. Waiting and done agents stay at the top however long they have been waiting, and a working agent drops down only when interruption detection sees it stop progressing. * `window`: tmux window order, which keeps rows still while agents work. Pairs well with the `{window_index}` token. ## Grouping [Section titled “Grouping”](#grouping) Grouping splits the list into sections with a header above each, one per repository or one per tmux session. It is off by default: ```yaml sidebar: group_by: project # or session ``` ![Sidebar grouped by project, with stale agents folded](/_astro/sidebar-grouped.D8aZuM4o_VAWuH.webp) Grouped by project, with each section counting its agents and folding away the stale ones Sections are alphabetical and keep their place while agents change status, so a row only ever moves within its own group. `sort` decides the order inside a section. Headers are labels, not agents: `j`/`k` and `g`/`G` skip them, they cannot be selected or clicked, and they are not counted by `{idx}`, `{jump_key}` or `workmux sidebar next|prev|jump `. A header counts the agents that sidebar shows, sleeping ones included. Scrolling into a group pins its header to the top until the next group’s header replaces it. Headers are drawn in the left sidebar only. With `position: top`, `group_by` still orders the chips. With the sidebar pane focused, press `t` to switch between grouped and flat. From anywhere, use the command line: ```bash workmux sidebar group # Toggle between grouped and flat workmux sidebar group project # One section per repository workmux sidebar group session # One section per tmux session workmux sidebar group none # One flat list, no headers workmux sidebar group --clear # Follow the config file again ``` Every sidebar switches together, the agent navigation commands follow the same order, and the choice survives a tmux restart. It also overrides `group_by` until you clear it, so run `workmux sidebar group --clear` once you have settled on a value in config. ### Grouped templates [Section titled “Grouped templates”](#grouped-templates) A header already names the project or session, so the rows under it can leave that out. Templates under `templates.grouped` apply while grouping is on: ```yaml sidebar: templates: grouped: header: "{group} {fill} {group_count}" tiles: - "{primary} {pane_suffix} {fill} {pr_number} {elapsed}" - "{pane_title} {fill} {pr_checks} {git_stats}" ``` `grouped` accepts `compact`, `tiles` and `header`. A field you leave out falls back to your ungrouped template of the same name, then to the grouped default, so a sidebar you have already customized keeps its rows when you group it. See [Customization](/guide/sidebar/customization/) for the available tokens. ## Folding stale agents [Section titled “Folding stale agents”](#folding-stale-agents) While grouped, each group’s stale agents fold behind one toggle row that says how many it stands for, so a project nobody is waiting on costs a line instead of a screen. An agent counts as stale once it is sleeping, or once the configured `stale_after` period passes with no activity and no working or waiting status: the same agents `dim_stale` dims and the dashboard marks or filters out. Set `collapse_stale: false` to list every agent at full height instead: ```yaml sidebar: group_by: project collapse_stale: false ``` A toggle row is selectable like any other: `Enter` or a click opens the fold the selection sits on. From anywhere in a group, `s` folds and unfolds it, and `l` and `h` (or the arrow keys) unfold and fold it. `S` opens every group at once, or closes them all when any is open. Agents shown from a fold take one line each rather than a full tile. A group whose agents are all stale has no live rows to head, so its header becomes its own toggle and the whole group costs one row. Those groups sort below every group still holding live work, under a `STALE` rule. Which groups are open is shared by every sidebar pane, for as long as the tmux server runs: closing and reopening the sidebar keeps your folds, restarting tmux collapses them again. A collapsed group still lists the agent of the window its sidebar sits in, so the sidebar never hides where you are, and the toggle counts only what stays folded. While grouped, stale agents are not jump targets: `{idx}` and `{jump_key}` skip them, `workmux sidebar next|prev|jump ` passes over them, and the numbers close up rather than leaving gaps. That holds whether they are folded away or shown, so what `Alt+1` reaches does not change with the number of idle agents above it. Select them with `j`/`k` or click them instead. A flat list numbers every agent it shows. ## Mouse support [Section titled “Mouse support”](#mouse-support) Click an agent tile or top-bar chip to jump to its pane, or scroll to navigate the list. tmux requires `set -g mouse on` in your `~/.tmux.conf`; Zellij needs no additional mouse configuration. ## Keybindings [Section titled “Keybindings”](#keybindings) These keys belong to the sidebar pane, so they work while it has focus. Move to it the way you move to any multiplexer pane, or click it. | Key | Action | | ------- | ------------------------- | | `j`/`k` | Navigate up/down | | `Enter` | Run the configured action | | `o` | Focus the agent pane | | `g`/`G` | Jump to first/last | | `v` | Toggle layout mode | | `f` | Toggle session filter | | `V` | Toggle rule-based views | | `t` | Toggle grouping | | `h`/`l` | Unfold/fold current group | | `s` | Toggle the current fold | | `S` | Fold/unfold every group | | `z` | Toggle sleeping on agent | | `?` | Show these keys | | `q` | Open quit confirmation | With `enter_action: select`, Enter shows the agent’s window and focuses that window’s sidebar. This keeps `j`/`k` available for scanning; press `o` when you want to enter the selected agent pane. If the target window has no sidebar, Enter falls back to focusing its agent pane. Mouse clicks always focus the pane. ### Session filter [Section titled “Session filter”](#session-filter) By default, the sidebar shows agents across all tmux sessions. With the sidebar focused, press `f` to show only agents in the same tmux session as the current window; press `f` again to include other sessions. If views are enabled, the window’s matching rules still apply. The filter also applies to agent navigation hotkeys (`next`/`prev`/`jump`), so `Alt+j`/`Alt+k` cycle through the current session when the session filter is active. You can also toggle the filter from the command line: ```bash workmux sidebar filter # Toggle between none and session workmux sidebar filter session # Filter to current session workmux sidebar filter none # Turn off the session filter ``` ### Named views [Section titled “Named views”](#named-views) Configure `sidebar.views` to show agents from selected sessions or project directories. Each window automatically shows the view matching its own agent. Use `other: true` for a view containing everything that does not match your other views. Press `V` to turn views off across all sidebars and show all agents. Press it again to restore each window’s matching view. You can also use `workmux sidebar view on` or `workmux sidebar view off`. See [Named views](/reference/commands/sidebar/#named-views) for configuration and matching rules. ### Sleeping agents [Section titled “Sleeping agents”](#sleeping-agents) Select an agent in the sidebar and press `z` to mark it as sleeping. Sleeping agents show a 💤 icon with dimmed colors and are pushed to the bottom of the list, regardless of their actual status. Under `group_by` they sink to the bottom of their own group. `sort: window` is the exception: it keeps every agent in window order, sleeping ones included. This is useful for temporarily deprioritizing agents you don’t need to monitor. Press `z` again to wake them up. ## Agent navigation hotkeys [Section titled “Agent navigation hotkeys”](#agent-navigation-hotkeys) You can switch between agents from any pane using subcommands. These work in the same order shown in the sidebar: | Command | Action | | -------------------------- | ------------------------------------ | | `workmux sidebar next` | Switch to the next agent (wraps) | | `workmux sidebar prev` | Switch to the previous agent (wraps) | | `workmux sidebar jump ` | Jump to the Nth agent (1-indexed) | ### Example tmux keybindings [Section titled “Example tmux keybindings”](#example-tmux-keybindings) ```bash # Alt+j / Alt+k to cycle agents (no prefix needed) bind -n M-j run-shell "workmux sidebar next" bind -n M-k run-shell "workmux sidebar prev" # Alt+1..9 to jump directly bind -n M-1 run-shell "workmux sidebar jump 1" bind -n M-2 run-shell "workmux sidebar jump 2" bind -n M-3 run-shell "workmux sidebar jump 3" # ... ``` ## How it works [Section titled “How it works”](#how-it-works) ### tmux [Section titled “tmux”](#tmux) The sidebar is a bit of a hack on top of tmux’s pane system, but it works quite well. It uses a daemon + client architecture with event-driven rendering: 1. **Toggle on** (`workmux sidebar`): creates a tmux pane on the left or top edge of every window, starts a background daemon, and installs tmux hooks. 2. **Daemon**: a single headless process that polls tmux state every 2 seconds (or immediately when signaled via SIGUSR1). It reads agent state from a context-scoped filesystem cache, queries tmux for pane geometry and active windows, then pushes snapshots to all connected sidebar clients over a Unix socket. Unchanged records are reused without loading or parsing their JSON. 3. **Clients**: every tmux window gets its own sidebar pane running a separate `workmux _sidebar-run` process. Each process connects to the shared daemon socket, receives snapshots via a background reader thread, and renders independently. The main thread blocks on a channel, only waking when new data arrives or a spinner tick is needed. Rendering is skipped entirely for inactive windows. This event-driven design keeps CPU usage near zero when idle. 4. **Hooks**: tmux hooks handle lifecycle events: * `after-new-window` / `after-new-session`: automatically adds a sidebar pane to newly created windows * `window-resized`: reflows the layout tree in every sidebar window, keeping all sidebars at the correct width or height regardless of which window was resized * `after-select-window` / `client-session-changed` / `after-kill-pane`: signals the daemon for an immediate refresh 5. **Layout reflow**: when the sidebar is added or the terminal is resized, a layout tree parser reads the tmux `#{window_layout}` string, scales the content subtree proportionally, and applies the result atomically via `select-layout`. This preserves existing pane proportions (e.g. a 70/30 split stays 70/30). 6. **Toggle off**: kills all sidebar panes, reflows content panes to fill the freed space, stops the daemon, and removes hooks. ### Zellij [Section titled “Zellij”](#zellij) The experimental Zellij backend uses the same daemon and per-tab clients, scoped to the current Zellij session. Zellij has no hook for new tabs, so the daemon adds sidebars to them during its two-second poll. Adding or removing the sidebar rebuilds each tab’s layout while running panes keep running. See [Zellij sidebar](/guide/zellij/#sidebar). ### Resource usage [Section titled “Resource usage”](#resource-usage) Because neither backend has a pane that persists across all windows or tabs, each window or tab runs its own `_sidebar-run` process. Each one uses roughly 15 MB of resident memory, and the shared daemon (`_sidebar-daemon`) uses about 16 MB. With five agents running, total memory footprint is around 90 MB. CPU usage is near zero when idle thanks to the event-driven architecture. # Customization > Customize the sidebar with templates, styling, and per-agent icons The sidebar renders each agent row from a small token-based template DSL. You can override the built-in templates per layout mode: ```yaml sidebar: templates: # Compact mode: a single line per agent. compact: "{status_icon} {primary} {pane_suffix} {fill} {elapsed}" # Tile mode: one string per visual line in the tile body. tiles: - "{primary} {pane_suffix} {fill} {elapsed}" - "{secondary} {fill} {git_stats}" - "{pane_title} {fill} {pr_number} {pr_checks}" # Horizontal mode: one string per visual line in each top bar chip. horizontal: - "{status_icon} {primary} {pane_suffix} {fill} {elapsed}" - "{secondary} {fill} {git_stats}" - "{pane_title} {fill} {pr_number} {pr_checks}" # Used instead of the templates above while sidebar.group_by is set. # Anything left out falls back to the template of the same name above, # then to the grouped default. grouped: header: "{group} {fill} {group_count}" tiles: - "{primary} {pane_suffix} {fill} {pr_number} {pr_checks} {elapsed}" - "{pane_title} {fill} {git_stats}" ``` The values shown above are also the built-in defaults, so leaving these keys unset gives you the standard rendering. `top` is also accepted as an alias for `horizontal`. Templates can be set in either the global config or a project’s `.workmux.yaml`. Project values override global values field by field, so a project that sets only `grouped.tiles` keeps the global `compact`, `tiles` and `horizontal` templates. Changes are picked up live by running sidebars without a restart. ## Tokens [Section titled “Tokens”](#tokens) | Token | Description | | ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | | `{primary}` | Primary identity label (worktree / window / session / project chain). | | `{secondary}` | Secondary label from the same chain, with worktree appended if not already primary. | | `{worktree}` | Worktree directory name. | | `{project}` | Project name (parent of the worktree). | | `{session}` | Tmux session name (blank for workmux-prefixed sessions). | | `{window}` | Tmux window name (blank for generic shell names like `zsh`, `bash`). | | `{window_index}` | Tmux window number as shown in the status bar (e.g. `3` for `3:wm-fix-auth`), usable with `prefix+N`. Empty on backends without window indexes. | | `{pane_title}` | Sanitized agent task title from the pane title. | | `{prompt}` | Latest prompt you sent to the agent. Empty until one is captured; see [Prompt column](/guide/dashboard/configuration/#prompt-column). | | `{pane_suffix}` | Disambiguator like `(1)`, `(2)` when multiple agents share a window. Empty otherwise. | | `{status_icon}` | Status indicator (working spinner, waiting, done, sleeping, etc.). | | `{agent_icon}` | Per-agent icon based on the running agent’s profile (see [Agent identity](#agent-identity)). | | `{agent_label}` | Capitalized agent name (e.g. `Claude`, `Codex`). | | `{elapsed}` | Elapsed time since the agent’s last status change. | | `{git_stats}` | Composite git diff stats: committed (`+1278 -400`), pen icon, uncommitted (`+21`). Self-degrades to fit the space it gets. | | `{git_branch}` | Current branch name. Empty when detached HEAD or git status unavailable. | | `{pr_number}` | Pull request number as `#123`. Empty when the current branch has no matching PR. | | `{pr_checks}` | GitHub check status for the current remote branch, with counts when space allows. Empty when no checks are known. | | `{git_ahead}` | Commits ahead of upstream as `↑N` when N greater than 0. Empty when 0 or no upstream. | | `{git_behind}` | Commits behind upstream as `↓N` when N greater than 0. Empty when 0 or no upstream. | | `{git_dirty}` | Diff glyph when the working tree is dirty. Empty when clean. | | `{git_conflict}` | Conflict glyph when the worktree has merge conflicts. Empty otherwise. | | `{status_label}` | Display name for the agent status: `Working`, `Waiting`, `Done`, or empty when no status. | | `{idx}` | 1-based position among the sidebar’s agents; group headers are not counted. | | `{jump_key}` | The `M-1`..`M-9` chord label for the first nine rows. Empty for row 10 and beyond. | | `{fill}` | Layout marker that splits a line into a left and right segment. At most one per line. | Group headers use their own token set, and agent tokens are rejected there because a header does not represent one agent: | Token | Description | | ---------------- | ------------------------------------------------------------------------ | | `{group}` | Group name: the project name or the tmux session name. | | `{group_count}` | Number of agents the sidebar shows in the group, sleeping ones included. | | `{group_status}` | Status tally for the group, using your status icons, most urgent first. | `{group}` is flexible, so a long group name truncates before `{group_count}` is dropped. `{group_status}` says what a group holds rather than how much, which is what you want from a group you cannot see inside: one that is folded, or scrolled out of view behind the pinned header. It is not in the default header: ```yaml sidebar: templates: grouped: header: "{group} {fill} {group_status} {group_count}" ``` One pair per status present, counting waiting, done, working and stale agents in that order. An idle agent has no icon of its own, so it is left out of the tally while `{group_count}` still counts it. When the header runs out of room the least urgent pairs drop first. `{git_ahead}` and `{git_behind}` already include the arrow prefix, so do not wrap them with another `↑` / `↓` literal in your template, otherwise a stray glyph would remain when the count is zero. The same applies to `{git_dirty}` and `{git_conflict}`, which are self-contained glyph indicators. `{pr_number}` is populated from the current git branch’s matching GitHub pull request. It renders empty on `main`/`master`, when the branch has no PR, when git status is unavailable, or while PR data has not been fetched yet. `{pr_checks}` is populated from the matching pull request’s head commit when a PR exists, then from the remote branch tip when the branch has no PR check data. On `main` and `master`, only failing checks render. Local-only branches and commits that have not been pushed render empty. Check status shows an icon and, when space allows, passed/total counts for pending or failing checks. Unknown tokens or unbalanced braces cause that template section to be rejected and the previous valid section (or the built-in default) is kept. The sidebar also shows a visible warning such as `template error: unknown token 'pr_status' at column 1 in tiles[0]` until the template is fixed. ## Layout [Section titled “Layout”](#layout) `{fill}` is the only layout marker. Tokens before it form the left segment and tokens after it form the right segment. The leftmost flex token in the left segment absorbs ellipsis-truncation when there isn’t enough room. Flex tokens are: `{primary}`, `{secondary}`, `{worktree}`, `{project}`, `{session}`, `{window}`, `{pane_title}`, `{prompt}`, `{group}`. Other tokens always render at their natural width. When a line has more slack than the flex token needs, the leftover is emitted as spaces between the left and right segments, so right-segment tokens like `{elapsed}` line up against the right edge. When a token resolves to an empty string, one adjacent literal whitespace is dropped automatically. This means `{primary} {pane_suffix} {fill} {elapsed}` renders cleanly whether or not `{pane_suffix}` is empty. In tile mode, the stripe, status icon column, and a 1-column right margin are drawn as chrome by the renderer. Templates only control the body area, so line alignment between tiles is automatic. A tile line containing a field still renders as a row when that field is empty, preserving tile height for templates like the default `{pane_title}` row. Use a blank string in the `tiles` list to skip that row entirely. In horizontal mode, each configured `horizontal` line renders inside every chip. The bar shows as many lines as its current height permits, so height 1 uses only the first line, height 2 also shows the secondary label and git stats, and height 3 also shows the pane title. ## Escaping [Section titled “Escaping”](#escaping) Use `{{` for a literal `{` and `}}` for a literal `}`. ## Styling [Section titled “Styling”](#styling) Templates accept the same tmux-style `#[...]` directives that workmux uses elsewhere (see [configuration](/guide/configuration/#agent-status-icons)). A directive is stateful: it applies to all subsequent literals, fields, and fill spaces on the same line until the next directive or `#[default]`. Each line starts with no overlay. ```yaml sidebar: templates: compact: "{status_icon} #[fg=cyan]{primary}#[default] {fill} {elapsed}" tiles: - "#[fg=cyan,bold]{primary}#[default] {pane_suffix} {fill} {elapsed}" - "{secondary} {fill} #[fg=green]{git_stats}#[default]" - "{pane_title} {fill} {pr_checks}" ``` Supported attributes are `fg=`, `bg=`, `bold`, `dim`, `italics`, `underscore`, `reverse`, `strikethrough`, their negations (`nobold`, `nodim`, `noitalics`, `nounderscore`, `noreverse`, `nostrikethrough`) to remove a modifier inherited from the token’s intrinsic style, plus `default`/`none` to clear the overlay. Colors may be hex (`#a6e3a1`), named (`red`, `green`, `cyan`, etc.), or indexed (`colour196`). For example, `{elapsed}` renders dim by default for visual hierarchy. To override: ```yaml sidebar: templates: tiles: - "{primary} {pane_suffix} {fill} #[fg=cyan,nodim]{elapsed}" ``` Notes: * Style codes are zero-width. They never affect `{fill}` alignment or ellipsis truncation. * Stale rows ignore template styling so the dim state remains visually authoritative. * The active row’s bold and the selected row’s background highlight are preserved; user `fg` patches over the active foreground while keeping bold. A user `bg=` will hide the selection highlight on the styled span. * An unclosed `#[...` is rendered as literal text; malformed directives inside `#[...]` are silently ignored. ## Agent identity [Section titled “Agent identity”](#agent-identity) Adding `{agent_icon}` or `{agent_label}` to a template surfaces which agent is running in each pane. Identity is detected from the stored agent command via the same profile system used elsewhere in workmux. Default icons: * `claude` → `CC` * `codex` → `CX` * `opencode` → `OC` * `gemini` → `G` * `pi` → `π` * `omp` → `⌥` * `kiro-cli` → `K` * `vibe` → `V` * `copilot` → `CP` * `grok` → `GK` Unknown agents render an empty icon. Default colors are brand accents: Claude orange, Codex teal, Gemini blue, Copilot purple, Grok blue, Vibe orange, Pi sage, OMP red/orange, OpenCode blue. Stale rows still dim and selected rows still take the highlight background; the icon color sits on top of those. Override icons or colors per agent under `sidebar.agent_icons`. Each value is either a bare string (icon only, default color stays) or an object with `icon` and `color`. Color values use the same format as `theme.custom`: hex (`'#ff8c00'`), named ANSI (`red`, `yellow`, `lightgreen`), or indexed (`'214'`). ```yaml sidebar: agent_icons: # Bare string: icon only, default brand color stays vibe: V # Override color only gemini: color: cyan # Override both claude: icon: CC color: "#ff8c00" # Disable the default color (use palette text color) codex: color: "" ``` A project-level `agent_icons` map merges into the global one per agent key. Setting `claude:` in a project replaces only the global `claude` entry; other agents defined in the global config are preserved. To clear an inherited override entirely for one agent, set its value to `null` (e.g. `claude: ~`). ## Status icons [Section titled “Status icons”](#status-icons) The `{status_icon}` token renders the working spinner, waiting indicator, done check, and sleeping indicator. Defaults depend on whether you have [nerdfont](/guide/configuration/) enabled: | State | Default (no nerdfont) | Default (nerdfont) | | -------- | --------------------- | ------------------- | | Working | braille spinner | braille spinner | | Waiting | 💬 | nf-fa-comment | | Done | ✅ | nf-md-check\_circle | | Sleeping | 💤 | nf-md-sleep | Override per state under top-level `status_icons`. Any value set here wins over both the emoji and nerdfont defaults, so you can mix and match. Setting `working` also replaces the braille spinner with a static icon: ```yaml status_icons: working: "🤖" waiting: "💬" done: "✅" ``` ## Examples [Section titled “Examples”](#examples) Show only the worktree and elapsed time per agent in compact mode: ```yaml sidebar: layout: compact templates: compact: "{status_icon} {worktree} {fill} {elapsed}" ``` Add the agent icon next to the primary label in tile mode: ```yaml sidebar: templates: tiles: - "{agent_icon} {primary} {pane_suffix} {fill} {elapsed}" - "{secondary} {fill} {git_stats}" - "{pane_title} {fill} {pr_checks}" ``` Configure only two tile lines and show git stats inline on line one: ```yaml sidebar: templates: tiles: - "{primary} {fill} {git_stats}" - "{secondary} {fill} {elapsed}" ``` Show pull request number and GitHub check status in tile mode: ```yaml sidebar: templates: tiles: - "{primary} {pane_suffix} {fill} {elapsed}" - "{secondary} {fill} {git_stats}" - "{pane_title} {fill} {pr_number} {pr_checks}" ``` # Skills > Use skills to streamline workmux workflows [Claude Code skills](https://code.claude.com/docs/en/skills) extend what Claude can do. Create a `SKILL.md` file with instructions, and Claude adds it to its toolkit. Claude uses skills when relevant, or you can invoke one directly with `/skill-name`. Tip This documentation uses Claude Code’s skill support as example, but other agents implement similar features. For example, [OpenCode skills](https://opencode.ai/docs/skills/). Adapt to your favorite agent as needed. ## Using with workmux [Section titled “Using with workmux”](#using-with-workmux) Skills unlock the full potential of workmux. While you can run workmux commands directly, skills let agents handle the complete workflow - committing with context-aware messages, resolving conflicts intelligently, and delegating tasks to parallel worktrees. * [**`/workmux`**](#workmux) - Teach the agent how to use workmux * [**`/merge`**](#merge) - Commit, rebase, and merge the current branch * [**`/rebase`**](#rebase) - Rebase with flexible target and smart conflict resolution * [**`/worktree`**](#worktree) - Delegate tasks to parallel worktree agents * [**`/coordinator`**](#coordinator) - Orchestrate multiple agents with full lifecycle control * [**`/open-pr`**](#open-pr) - Write a PR description using conversation context You can trigger `/merge` from the [dashboard](/guide/dashboard/configuration/) using the `m` keybinding: ```yaml dashboard: merge: "/merge" ``` ## Installation [Section titled “Installation”](#installation) Run `workmux setup` to install all skills automatically: ```bash workmux setup --skills ``` This detects installed Claude Code, OpenCode, Pi, and Oh My Pi agents and copies skills to the right location. The setup wizard also offers skill installation on first run. You can also copy skills manually from [`skills/`](https://github.com/raine/workmux/tree/main/skills) to your skills directory: **Claude Code**: `~/.claude/skills/` (or project `.claude/skills/`). If `CLAUDE_CONFIG_DIR` is set, `workmux setup --skills` installs to `$CLAUDE_CONFIG_DIR/skills/` instead. **OpenCode**: `~/.config/opencode/skills/`. **Pi**: `~/.pi/agent/skills/`. **Oh My Pi**: `~/.omp/agent/skills/`. ## `/workmux` [Section titled “/workmux”](#workmux) Teaches the agent how to use the workmux CLI. Invoke `/workmux` to give the agent knowledge of workmux commands, configuration, and concepts. The agent can then use workmux to manage worktrees, check status, and interact with other agents. [**View skill ->**](https://github.com/raine/workmux/tree/main/skills/workmux/SKILL.md) This is a reference skill, not an action skill. It loads workmux documentation into the agent’s context so it can use workmux commands as needed. For specific workflows, the agent is directed to the dedicated skills below. ## `/merge` [Section titled “/merge”](#merge) Handles the complete merge workflow: 1. Commit staged changes using a specific commit style 2. Rebase onto the base branch with smart conflict resolution 3. Run `workmux merge` to merge, clean up, and send a notification when complete [**View skill →**](https://github.com/raine/workmux/tree/main/skills/merge/SKILL.md) Instead of just running `workmux merge`, this skill: * Commits staged changes first - the agent has full context on the work done and can write a meaningful commit message * Reviews base branch changes before resolving conflicts - the agent understands both sides and can merge intelligently * Asks for guidance on complex conflicts ## `/rebase` [Section titled “/rebase”](#rebase) Rebases with flexible target selection and smart conflict resolution. [**View skill →**](https://github.com/raine/workmux/tree/main/skills/rebase/SKILL.md) Usage: `/rebase`, `/rebase origin`, `/rebase origin/develop`, `/rebase feature-branch` See [Resolve merge conflicts with Claude Code](https://raine.dev/blog/resolve-conflicts-with-claude/) for more on this approach. ## `/worktree` [Section titled “/worktree”](#worktree) Delegates tasks to parallel worktree agents. A main agent on the main branch can act as a coordinator: planning work and delegating tasks to worktree agents. [**View skill →**](https://github.com/raine/workmux/tree/main/skills/worktree/SKILL.md) See the [blog post on delegating tasks](https://raine.dev/blog/git-worktrees-parallel-agents/) for a detailed walkthrough. Usage: ```bash > /worktree Implement user authentication > /worktree Fix the race condition in handler.go > /worktree Add dark mode, Implement caching # multiple tasks ``` ### Customization [Section titled “Customization”](#customization) You can customize the skill to add additional instructions for worktree agents. For example, to have agents review their changes with a subagent before finishing, or run `workmux merge` after completing their task. ## `/coordinator` [Section titled “/coordinator”](#coordinator) Orchestrates the full lifecycle of multiple worktree agents: spawning, monitoring, communicating, and merging. Unlike `/worktree` which dispatches tasks and returns, `/coordinator` turns the agent into a persistent orchestrator that manages agents through completion. [**View skill ->**](https://github.com/raine/workmux/tree/main/skills/coordinator/SKILL.md) The coordinator agent does not implement tasks itself. It writes prompt files, spawns worktree agents, monitors their status, sends follow-up instructions, and triggers merges. ### Key commands used [Section titled “Key commands used”](#key-commands-used) | Command | Purpose | | -------------------------- | ----------------------------------------------- | | `workmux add -b -P ` | Spawn an agent in the background | | `workmux status` | Check agent statuses | | `workmux wait` | Block until agents reach a target status | | `workmux capture` | Read terminal output from an agent | | `workmux send` | Send instructions or skill commands to an agent | | `workmux run` | Run shell commands in an agent’s worktree | ### Cross-project agent communication [Section titled “Cross-project agent communication”](#cross-project-agent-communication) Agent commands (`send`, `capture`, `status`, `wait`, `run`) can target agents in other projects, not just the current git repository. If a worktree name is not found locally, workmux searches all active agents globally. ```bash # From any project, send to an agent in another project workmux send other-project-worktree "run the tests" # Use project:handle syntax to disambiguate when names collide workmux send myproject:docs-update "also add the API reference" # Check status of agents across projects workmux status myproject:feature-auth ``` Lifecycle commands (`add`, `open`, `merge`, `remove`, `close`) remain scoped to the current repository. ### Fan-out / fan-in pattern [Section titled “Fan-out / fan-in pattern”](#fan-out--fan-in-pattern) The typical coordinator workflow: 1. Write prompt files with full context for each task 2. Spawn all agents in the background 3. Confirm agents started with `workmux wait --status working` 4. Wait for completion with `workmux wait` 5. Review results with `workmux capture` 6. Merge one at a time by sending `/merge` to each agent sequentially ### When to use `/coordinator` vs `/worktree` [Section titled “When to use /coordinator vs /worktree”](#when-to-use-coordinator-vs-worktree) * **`/worktree`**: fire and forget. Spawn agents and return control to you. Good for delegating tasks you will review later yourself. * **`/coordinator`**: full automation. The agent manages the entire lifecycle, including waiting, reviewing output, sending follow-ups, and merging. Good for multi-step plans where tasks depend on each other. ## `/open-pr` [Section titled “/open-pr”](#open-pr) Writes a PR description using the conversation context and opens the PR creation page in browser. This is the recommended way to finish work in repos that use pull requests. [**View skill →**](https://github.com/raine/workmux/tree/main/skills/open-pr/SKILL.md) The skill is opinionated: it opens the PR creation page in your browser rather than creating the PR directly. This lets you review and edit the description before submitting. The agent knows what it built and why, so it can write a PR description that captures that context. # Status tracking > Display agent status in multiplexer tabs for at-a-glance visibility Workmux can display the status of the agent in tmux window names and Zellij tab titles, giving you at-a-glance visibility into what the agent in each window is doing. ![tmux status showing agent icons](/_astro/status.DyzcgSvT_1KQBer.webp) ## Agent support [Section titled “Agent support”](#agent-support) | Agent | Status | | ----------------------- | --------------------------------------------------------------------------- | | Claude Code | ✅ Supported | | OpenCode | ✅ Supported | | Codex | ✅ Supported | | Copilot CLI | ✅ Supported\* | | Pi | ✅ Supported\* | | Oh My Pi | ✅ Supported | | Gemini CLI | ✅ Supported | | Grok | ✅ Supported | | Antigravity CLI (`agy`) | ✅ Supported\* | | Kiro | [Tracking issue](https://github.com/kirodotdev/Kiro/issues/5440) | | Mistral Vibe | [Tracking issue](https://github.com/mistralai/mistral-vibe/discussions/334) | **Notes:** * **Copilot CLI**: 💬 waiting state requires Copilot CLI 1.0.18 or later * **Pi**: No 💬 waiting state * **Codex**: Registration occurs when the first turn begins because its session hook is turn-bound * **Antigravity CLI (`agy`)**: No 💬 waiting state; registration occurs when agent execution begins * **Kiro**: Hooks support is messy: requires a custom agent since the default can’t be edited ## Status icons [Section titled “Status icons”](#status-icons) * 🤖 = agent is working * 💬 = agent is waiting for user input * ✅ = agent finished (auto-clears on window focus in tmux) ## Automated setup [Section titled “Automated setup”](#automated-setup) Run `workmux setup` to automatically detect your agent CLIs and install status tracking hooks: ```bash workmux setup ``` This detects Claude Code, Codex, Copilot CLI, Gemini CLI, Grok, Antigravity CLI, OpenCode, Pi, and Oh My Pi by checking for their executable or configuration directories, then offers to install the appropriate hooks. Agent-specific configuration directory overrides are respected. Workmux also offers updates when an installed integration differs from its bundled version. Workmux automatically modifies your tmux `window-status-format` to display the status icons. This happens once per session and only affects the current tmux session (not your global config). ## Claude Code setup [Section titled “Claude Code setup”](#claude-code-setup) If you prefer manual setup, install the workmux status plugin: ```bash claude plugin marketplace add raine/workmux claude plugin install workmux-status ``` Alternatively, you can manually add the hooks to `~/.claude/settings.json`. See [.claude-plugin/plugin.json](https://github.com/raine/workmux/blob/main/.claude-plugin/plugin.json) for the hook configuration. ## Pi setup [Section titled “Pi setup”](#pi-setup) If you prefer manual setup, copy the workmux status extension to your global pi extensions directory: ```bash mkdir -p ~/.pi/agent/extensions curl -o ~/.pi/agent/extensions/workmux-status.ts \ https://raw.githubusercontent.com/raine/workmux/main/resources/pi/extensions/workmux-status.ts ``` Restart pi for the extension to take effect. ### Pi subagents [Section titled “Pi subagents”](#pi-subagents) With a [pi-suba](https://github.com/raine/pi-suba) release that publishes activity snapshots, the parent stays working while either the parent or any delegated child is active. Waiting children do not count as active. When both the parent and all children are inactive, workmux reports done. Resuming a child marks the parent working again, even without a new parent turn. The extensions communicate through `pi.events`: pi-suba publishes `suba:activity` with `{ activeCount: number }`, and workmux requests an initial snapshot with `suba:activity:request`. Workmux does not read child session files or poll child processes. Without an activity publisher, Pi status behavior is unchanged, including keeping aborted turns working for continuation. With a publisher, a settled aborted parent is inactive, but active children still keep it working. ## Oh My Pi setup [Section titled “Oh My Pi setup”](#oh-my-pi-setup) If you prefer manual setup, copy the workmux status extension to your global OMP extensions directory: ```bash mkdir -p ~/.omp/agent/extensions curl -o ~/.omp/agent/extensions/workmux-status.ts \ https://raw.githubusercontent.com/raine/workmux/main/resources/omp/extensions/workmux-status.ts ``` Restart omp for the extension to take effect. ## OpenCode setup [Section titled “OpenCode setup”](#opencode-setup) OpenCode V2 status tracking requires the terminal UI; headless `opencode run` is not tracked. For manual setup: ```bash mkdir -p ~/.config/opencode/plugins/workmux-status for file in index.ts tui.ts status.ts; do curl -fsSL -o "$HOME/.config/opencode/plugins/workmux-status/$file" \ "https://raw.githubusercontent.com/raine/workmux/main/resources/opencode/v2/workmux-status/$file" done ``` When switching versions manually, back up any local edits and remove the other version’s workmux plugin: `plugins/workmux-status.ts` (or `plugin/workmux-status.ts`) for V1, `plugins/workmux-status/` for V2. Restart OpenCode for the plugin to take effect. ## Codex setup [Section titled “Codex setup”](#codex-setup) If you prefer manual setup, first ensure hooks are enabled in your Codex config: ```toml # ${CODEX_HOME:-$HOME/.codex}/config.toml [features] hooks = true ``` Then download the hooks configuration: ```bash codex_home="${CODEX_HOME:-$HOME/.codex}" mkdir -p "$codex_home" curl -o "$codex_home/hooks.json" \ https://raw.githubusercontent.com/raine/workmux/main/resources/codex/hooks/workmux-status.json ``` If you already have a `hooks.json` in your Codex home, merge the hook entries from the downloaded file into your existing configuration. Codex permission prompts use the 💬 waiting state. ## Gemini CLI setup [Section titled “Gemini CLI setup”](#gemini-cli-setup) If you prefer manual setup, download the hooks configuration and merge it into your Gemini settings: ```bash gemini_dir="${GEMINI_CLI_HOME:-$HOME}/.gemini" curl -s https://raw.githubusercontent.com/raine/workmux/main/resources/gemini/settings.json \ | jq -s '.[0] * .[1]' "$gemini_dir/settings.json" - > /tmp/gemini-settings.json \ && mv /tmp/gemini-settings.json "$gemini_dir/settings.json" ``` If you don’t have an existing Gemini settings file, you can download the hooks configuration directly: ```bash gemini_dir="${GEMINI_CLI_HOME:-$HOME}/.gemini" mkdir -p "$gemini_dir" curl -o "$gemini_dir/settings.json" \ https://raw.githubusercontent.com/raine/workmux/main/resources/gemini/settings.json ``` ## Grok setup [Section titled “Grok setup”](#grok-setup) `workmux setup` installs Grok lifecycle hooks under `$GROK_HOME/hooks/`, or `~/.grok/hooks/` when `GROK_HOME` is unset. Start a new Grok session after setup so it discovers the hook. For manual setup, download the hooks configuration: ```bash grok_home="${GROK_HOME:-$HOME/.grok}" mkdir -p "$grok_home/hooks" curl -o "$grok_home/hooks/workmux-status.json" \ https://raw.githubusercontent.com/raine/workmux/main/.grok/hooks/workmux-status.json ``` `UserPromptSubmit` and `PostToolUse` mark the pane working, `Notification` marks it waiting, and `Stop` or `SessionEnd` marks it done. Grok permission prompts do not all emit `Notification`, so some prompts may remain marked as working while waiting for input. ## Antigravity CLI (`agy`) setup [Section titled “Antigravity CLI (agy) setup”](#antigravity-cli-agy-setup) `workmux setup` installs Antigravity lifecycle hooks in `~/.gemini/config/hooks.json`. The first `PreInvocation` handler registers the pane when agent execution begins, the second marks it working, and the terminal `Stop` event marks it done. Antigravity loads hook configuration when a session starts, so restart existing `agy` sessions after setup. For manual setup, merge this named hook group into `~/.gemini/config/hooks.json`: ```json { "workmux-status": { "PreInvocation": [ { "type": "command", "command": "workmux register-agent >/dev/null 2>&1 || true; printf '{}\\n'" }, { "type": "command", "command": "workmux set-window-status working >/dev/null 2>&1 || true; printf '{}\\n'" } ], "Stop": [ { "type": "command", "command": "workmux set-window-status done >/dev/null 2>&1 || true; printf '{}\\n'" } ] } } ``` ## Copilot CLI setup [Section titled “Copilot CLI setup”](#copilot-cli-setup) Copilot CLI 0.0.422 or later supports personal hooks. If you prefer manual setup, install the workmux hook under `$COPILOT_HOME/hooks/`, or `~/.copilot/hooks/` when `COPILOT_HOME` is unset: ```bash copilot_home="${COPILOT_HOME:-$HOME/.copilot}" mkdir -p "$copilot_home/hooks" curl -o "$copilot_home/hooks/workmux-status.json" \ https://raw.githubusercontent.com/raine/workmux/main/resources/copilot/hooks/workmux-status/hooks.json ``` Copilot loads personal hooks in every repository. If the repository contains a `.github/hooks/workmux-status` installation, remove that directory to avoid running both copies of the hook. The `notification` hook marks the pane waiting when Copilot shows a permission prompt or asks a question. `postToolUse` and `postToolUseFailure` restore working when the tool finishes, and `userPromptSubmitted` marks a new prompt working. Copilot CLI 1.0.18 or later is required for the waiting state. Run `workmux setup` to update older workmux hooks, then start a new Copilot session to load the changes. ## Customization [Section titled “Customization”](#customization) You can customize the icons in your config: \~/.config/workmux/config.yaml ```yaml status_icons: working: "🔄" waiting: "⏸️" done: "✔️" ``` Tmux style codes are supported for colored icons, and work in both the tmux status bar and the dashboard: ```yaml status_icons: done: "#[fg=#a6e3a1]󰄴#[fg=default]" ``` Zellij displays the visible icon text in its tab title and ignores tmux style codes. Zellij does not auto-clear waiting or done icons on tab focus; the next status update replaces them. If you prefer to manage the tmux format yourself, disable auto-modification and add the status variable to your `~/.tmux.conf`: \~/.config/workmux/config.yaml ```yaml status_format: false ``` \~/.tmux.conf ```bash set -g window-status-format '#I:#W#{?@workmux_status, #{@workmux_status},}#{?window_flags,#{window_flags}, }' set -g window-status-current-format '#I:#W#{?@workmux_status, #{@workmux_status},}#{?window_flags,#{window_flags}, }' ``` ## Interrupted agent detection [Section titled “Interrupted agent detection”](#interrupted-agent-detection) When an agent is in “working” status but its pane output hasn’t changed for 10 seconds, workmux automatically detects it as interrupted. This typically happens when a user presses Ctrl+C to stop an agent. The detection runs in the sidebar daemon. If the agent resumes producing output, the interrupted indicator clears automatically. The dashboard reads the detection results from a shared runtime file, so both views stay in sync. ## Jump to completed or waiting agents [Section titled “Jump to completed or waiting agents”](#jump-to-completed-or-waiting-agents) Use `workmux last-done` to quickly switch to the agent that most recently finished its task or is waiting for user input. Repeated invocations cycle through all completed and waiting agents in reverse chronological order (most recent first). Add a tmux keybinding for quick access: \~/.tmux.conf ```bash bind l run-shell "workmux last-done" ``` Then press `prefix + l` to jump to the last completed or waiting agent, press again to cycle to the next oldest, and so on. This is useful when you have multiple agents running and want to quickly attend to agents that need your attention. ## Toggle between agents [Section titled “Toggle between agents”](#toggle-between-agents) Use `workmux last-agent` to toggle between your current agent and the last one you visited. This works like vim’s `Ctrl+^` or tmux’s `last-window` - it remembers which agent you came from and switches back to it. Pressing it again returns you to where you were. This is available both as a CLI command and as the `Tab` key in the [dashboard](/guide/dashboard/). Add a tmux keybinding for quick access: \~/.tmux.conf ```bash bind Tab run-shell "workmux last-agent" ``` Then press `prefix + Tab` to toggle between your two most recent agents. ## Disabling status hooks for nested agents [Section titled “Disabling status hooks for nested agents”](#disabling-status-hooks-for-nested-agents) If you launch another agent from inside an agent, that nested agent may run its own configured workmux status hooks and report activity from the same pane. Set `WORKMUX_DISABLE_SET_WINDOW_STATUS=1` on the nested command to make `workmux set-window-status` exit successfully without updating tmux or agent state: ```bash WORKMUX_DISABLE_SET_WINDOW_STATUS=1 codex ``` Use this when you want only the parent agent pane to drive the workmux status indicator. # WezTerm > Use WezTerm as an alternative multiplexer backend Experimental The WezTerm backend is new and experimental. Expect rough edges and potential issues. [WezTerm](https://wezterm.org/) can be used as an alternative to tmux. Detected automatically via `$WEZTERM_PANE`. ## Differences from tmux [Section titled “Differences from tmux”](#differences-from-tmux) | Feature | tmux | WezTerm | | -------------------- | -------------------- | ----------------- | | Agent status in tabs | Yes (window names) | Dashboard only | | Tab ordering | Insert after current | Appends to end | | Scope | tmux session | WezTerm workspace | * **Tab ordering**: New tabs appear at the end of the tab bar (no “insert after” support like tmux) * **Workspace isolation**: workmux operates within the current WezTerm workspace (analogous to tmux sessions). Tabs in other workspaces are not affected. * **Exit detection**: Uses title heuristics to detect when agents exit ## Requirements [Section titled “Requirements”](#requirements) * WezTerm with CLI enabled (`wezterm cli` must work) * Unix-like OS (named pipes for handshakes) * Windows is **not supported** * **Required WezTerm configuration** (see below) ## Required WezTerm configuration [Section titled “Required WezTerm configuration”](#required-wezterm-configuration) workmux relies on WezTerm’s environment variables (`WEZTERM_PANE`, `WEZTERM_UNIX_SOCKET`) being consistent across all panes. This requires connecting to the mux server on startup. Add this to your `wezterm.lua`: ```lua local config = wezterm.config_builder() -- REQUIRED: Connect to unix mux server on startup -- This ensures WEZTERM_UNIX_SOCKET is consistent across all panes config.default_gui_startup_args = { 'connect', 'unix' } -- REQUIRED: Configure unix_domains for the mux server config.unix_domains = { { name = 'unix' }, } ``` Additionally, if you have custom keybindings for creating tabs, ensure they use `CurrentPaneDomain`: ```lua -- CORRECT: Uses the current pane's domain (mux server) { key = 't', mods = 'SUPER', action = act.SpawnTab('CurrentPaneDomain') }, -- WRONG: This spawns in the GUI domain, breaking workmux -- { key = 't', mods = 'SUPER', action = act.SpawnTab({ DomainName = 'local' }) }, ``` Without this configuration, panes created via keybindings may connect to a different socket than panes created by workmux, causing state inconsistencies. ## Cross-workspace navigation [Section titled “Cross-workspace navigation”](#cross-workspace-navigation) The dashboard can show agents from all workspaces with `--all` (or pressing `a`). However, WezTerm’s CLI cannot directly switch workspaces. To enable jumping to tabs in other workspaces, add this to your `wezterm.lua`: ```lua local wezterm = require("wezterm") wezterm.on("user-var-changed", function(window, pane, name, value) if name == "workmux-switch-pane" then local data = wezterm.json_parse(value) -- Switch to the target workspace window:perform_action( wezterm.action.SwitchToWorkspace({ name = data.workspace }), pane ) -- Find and activate the tab by title (stable across mux contexts) wezterm.time.call_after(0.1, function() for _, win in ipairs(wezterm.mux.all_windows()) do for _, tab in ipairs(win:tabs()) do if tab:get_title() == data.tab_title then tab:activate() local panes = tab:panes() if #panes > 0 then panes[1]:activate() end return end end end end) end end) ``` Without this configuration, the dashboard can display agents from all workspaces but jumping to panes in other workspaces will not work. ## Known limitations [Section titled “Known limitations”](#known-limitations) * Windows is not supported (requires Unix-specific features) * Cross-workspace jumping requires Lua config (see above) * Some edge cases may not be as thoroughly tested as the tmux backend * Agent status icons do not appear in tab titles ## Credits [Section titled “Credits”](#credits) Thanks to [@JeremyBYU](https://github.com/JeremyBYU) for contributing WezTerm support. # Workflows > Recommended patterns for starting worktrees and delegating tasks to agents Common patterns for working with workmux and AI agents. ## Starting work [Section titled “Starting work”](#starting-work) ### From the terminal [Section titled “From the terminal”](#from-the-terminal) When starting a new task from scratch, use `workmux add -A` (`--auto-name`): ```bash workmux add -A ``` This opens your `$EDITOR` where you describe the task. After saving, workmux generates a branch name from your prompt and creates the worktree with the prompt passed to the agent. It’s essentially a streamlined version of `workmux add `, then waiting for the agent to start, then typing the prompt. But you write the prompt first and skip thinking of a branch name. Tip The `-A` flag requires the [`llm`](https://llm.datasette.io/) CLI tool to be installed and configured. See [Automatic branch name generation](/reference/commands/add/#automatic-branch-name-generation) for setup. Combine with `-b` (`--background`) to launch the worktree without switching to it. You can also pass the prompt inline or from a file: ```bash # Inline prompt workmux add -A -p "Add pagination to the /users endpoint" # From a file workmux add -A -P task-spec.md ``` ### From an ongoing agent session [Section titled “From an ongoing agent session”](#from-an-ongoing-agent-session) When you’re already working with an agent and want to spin off a task into a separate worktree, use the [`/worktree` skill](/guide/skills/#worktree). The agent has context on what you’ve discussed, so it can write a detailed prompt for the new worktree agent. ```plaintext > /worktree Implement the caching layer we discussed ``` The main agent writes a prompt file with all the relevant context and runs `workmux add` to create the worktree. This is useful when: * The agent already understands the task from your conversation * You want to parallelize work while continuing in the main window * You’re delegating multiple related tasks from a plan Add `--fork` to pass the current conversation to the new worktree agent, so it can resume with full context instead of starting from a written prompt alone: ```plaintext > /worktree --fork Implement the caching layer we discussed ``` This pattern naturally leads to a **coordinator agent** workflow: an agent on the main branch that plans work and delegates tasks to worktree agents via `/worktree`. The coordinator stays on main and doesn’t write code itself; it breaks down a larger goal into parallel tasks and spins up worktree agents to handle each one. See [Skills](/guide/skills/#worktree) for the skill setup. ### Forking conversations [Section titled “Forking conversations”](#forking-conversations) When you want a new worktree agent to pick up where the current conversation left off, use `--fork` (Claude Code, Codex, and Pi): ```bash workmux add -A --fork ``` This takes the most recent conversation from the current worktree and launches the agent in the new worktree resuming it, so it has full context of what was discussed. Useful when: * You want to branch off a conversation to explore an alternative approach * The current agent has built up context you want to preserve in a new worktree * You’re splitting a large task and want each worktree to start with shared context To fork a specific session (not the most recent), use `--fork=` with the session UUID or a prefix: ```bash workmux add my-branch --fork=abc123 ``` Supports Claude Code, Codex, and Pi conversations. The parent conversation is left as it was, so forking never disturbs the worktree you started from. Claude Code has no cross-project resume, so workmux copies the conversation files into the new worktree’s project directory and launches `claude --resume `. Codex forks natively, so workmux resolves which session to fork and launches `codex fork -C `, which keeps the forked conversation in the new worktree. Pi also forks natively: workmux launches `pi --fork ` in the new worktree. Pi must support the `--fork` CLI option. Pi session discovery uses `~/.pi/agent/sessions` (or `$PI_CODING_AGENT_DIR/sessions`) and matches the session’s recorded working directory to the source worktree root. For a custom session store, export `PI_CODING_AGENT_SESSION_DIR` when running workmux; Pi’s `--session-dir` flag and `sessionDir` setting are not read by workmux. ### Coordinating multiple agents [Section titled “Coordinating multiple agents”](#coordinating-multiple-agents) For multi-step plans where you want the agent to manage the full lifecycle (spawning, monitoring, and merging), use the [`/coordinator` skill](/guide/skills/#coordinator). ```plaintext > /coordinator Break down the auth refactor into parallel tasks: 1. Extract session logic into its own module 2. Add OAuth provider support 3. Write integration tests for the new auth flow ``` The coordinator agent writes prompt files for each task, spawns worktree agents in the background, waits for them to finish, reviews their output, and merges results sequentially. You stay hands-off while it runs. This is useful when: * You have a plan with multiple independent tasks * Tasks should be merged in a specific order * You want the agent to send follow-up instructions based on results * You want full automation without checking in on each agent manually See [Skills](/guide/skills/#coordinator) for more details on the coordinator pattern. ## Finishing work [Section titled “Finishing work”](#finishing-work) How you finish depends on whether you merge locally or use pull requests. ### Direct merge [Section titled “Direct merge”](#direct-merge) When you want to merge directly without a pull request, use `/merge` to commit, rebase, and merge in one step: ```plaintext > /merge ``` This slash command handles the full workflow: committing staged changes, rebasing onto main, resolving conflicts if needed, and running `workmux merge` to clean up. If you need to sync with main before you’re ready to merge (e.g., to pick up changes from other merged branches), use `/rebase`: ```plaintext > /rebase ``` The CLI equivalent is `workmux rebase`, which rebases the current or named worktree branch onto its saved base branch (or main when no local base exists). See [Skills](/guide/skills/) for the skill setup. ### PR-based [Section titled “PR-based”](#pr-based) If your team uses pull requests for code review, the merge happens on the remote after review. Push your branch and clean up after the PR is merged. After committing your changes, push and create a PR. If you’re working with an agent, consider using a slash command like `/open-pr` that can write the PR description using the conversation context: ```plaintext > /open-pr ``` See [`skills/open-pr`](https://github.com/raine/workmux/tree/main/skills/open-pr/SKILL.md) for an example skill you can adapt. Or manually: ```bash git push -u origin feature-123 gh pr create ``` Once your PR is merged on GitHub, use `workmux remove` to clean up: ```bash # Remove a specific worktree workmux remove feature-123 # Or clean up all worktrees whose remote branches were deleted workmux rm --gone ``` The `--gone` flag is particularly useful - it automatically finds worktrees whose upstream branches no longer exist (because the PR was merged and the branch was deleted on GitHub) and removes them. # Zellij > Use Zellij as an alternative multiplexer backend Experimental The Zellij backend is new and experimental and requires Zellij 0.44.1 or later. Expect rough edges and potential issues. [Zellij](https://zellij.dev/) can be used as an alternative to tmux. Detected automatically via `$ZELLIJ`. ![workmux running in zellij with multiple agents](/_astro/zellij-screenshot.Dv5Bs-X__ZNy1Dz.webp) ## Differences from tmux [Section titled “Differences from tmux”](#differences-from-tmux) | Feature | tmux | Zellij | | -------------------- | -------------------- | ------------------ | | Agent status in tabs | Yes (window names) | Yes (tab titles) | | Tab ordering | Insert after current | Appends to end | | Scope | tmux session | Zellij session | | Session mode | Yes | No (window only) | | Pane size control | Percentage-based | 50/50 splits only | | Stacked panes | No | Yes | | Dashboard preview | Yes | No | | Agent sidebar | Yes | Yes (experimental) | * **Tab ordering**: New tabs appear at the end of the tab bar (no “insert after” support like tmux) * **Session isolation**: workmux operates within the current Zellij session. Tabs in other sessions are not affected. * **Window mode only**: Session mode (`--session`) is not supported. Use window mode instead. * **Pane splits**: Horizontal and vertical splits are 50/50 - percentage-based sizing is not available via the Zellij CLI. * **Stacked panes**: Use `split: stacked` in a pane config to create a Zellij stack with the previous pane, or with the pane selected by `target`. * **No dashboard preview**: Zellij’s `dump-screen` only captures the focused pane, so preview in the dashboard is disabled. ## Sidebar [Section titled “Sidebar”](#sidebar) The [agent sidebar](/guide/sidebar/) works across every tab in the current Zellij session: ```bash workmux sidebar workmux sidebar on --position top workmux sidebar off ``` Zellij has no hook for new tabs, so the sidebar daemon polls session state and adds a sidebar to a new tab when it becomes active, usually within about two seconds. Closing the sidebar or running `workmux sidebar off` removes it from every tab in the session. The sidebar is limited to the current Zellij session, so `workmux sidebar --session` behaves the same as `workmux sidebar`. Left and top placement are supported. Adding or removing the sidebar rebuilds each tab’s layout. Running terminal panes keep running, and pane order, focus, floating panes and split proportions are preserved. The configured `panes` are not launched again. `sidebar.width`, `sidebar.height`, `--width` and `--height` apply when the sidebar is added; a manually resized sidebar keeps its size until you run `workmux sidebar on` again, which replaces the existing sidebars. Zellij 0.45.1 and earlier These releases reuse client IDs, so concurrent `zellij action` calls can intermittently fail with `There is no active session!` or return empty output. Toggling the sidebar runs many such calls while the daemon polls session state, so a toggle can occasionally fail partway and leave panes out of order. This is fixed in Zellij releases after 0.45.1 ([zellij-org/zellij#5630](https://github.com/zellij-org/zellij/pull/5630)). ## Requirements [Section titled “Requirements”](#requirements) * Zellij 0.44.1 or later * Unix-like OS (named pipes for handshakes) * Windows is **not supported** ## Configuration [Section titled “Configuration”](#configuration) No special Zellij configuration is required. workmux uses Zellij’s built-in CLI actions (`zellij action`) which work out of the box. If you want to override the auto-detected backend, set the `WORKMUX_BACKEND` environment variable: ```bash export WORKMUX_BACKEND=zellij ``` Zellij stacked panes are supported with `split: stacked`: ```yaml panes: - command: name: agent focus: true - command: just test --watch name: tests split: stacked - command: tail -f app.log name: logs split: stacked target: 0 ``` Zellij pane display names are supported with `name`. workmux applies them using `zellij action rename-pane --pane-id`, so the pane does not need to be focused. Agent status icons are appended to workmux tab titles. Zellij does not expose a focus hook equivalent to tmux, so waiting and done icons are replaced by the next status update rather than clearing when the tab receives focus. ## Known limitations [Section titled “Known limitations”](#known-limitations) * Windows is not supported (requires Unix-specific features) * Session mode is not supported - only window mode works * Agent status icons do not auto-clear when a tab receives focus * Dashboard preview pane is disabled (captures focused pane only) * Horizontal and vertical pane splits are always 50/50 (no percentage-based sizing) * Fixed sidebar sizes follow Zellij’s layout behavior when the terminal itself is resized * Tab insertion ordering is not supported (new tabs always appear at the end) * Some edge cases may not be as thoroughly tested as the tmux backend ## Credits [Section titled “Credits”](#credits) Thanks to [Leonid Danilov](https://github.com/Infonautica) for contributing Zellij support. # CLI reference > Complete reference for all workmux commands ## Commands overview [Section titled “Commands overview”](#commands-overview) | Command | Description | | ------------------------------------------------- | --------------------------------------------------- | | [`add`](/reference/commands/add/) | Create a new worktree and tmux window | | [`merge`](/reference/commands/merge/) | Merge a branch and clean up everything | | [`rebase`](/reference/commands/rebase/) | Rebase a worktree branch onto its base branch | | [`remove`](/reference/commands/remove/) | Remove worktrees without merging | | [`rename`](/reference/commands/rename/) | Rename a worktree, its tmux window, and branch | | [`list`](/reference/commands/list/) | List all worktrees with status | | [`status`](/reference/commands/status/) | Query tracked agent status | | [`open`](/reference/commands/open/) | Open a tmux window for an existing worktree | | [`close`](/reference/commands/close/) | Close a worktree’s tmux window (keeps worktree) | | [`resurrect`](/reference/commands/resurrect/) | Restore worktree windows after a crash | | [`sync-files`](/reference/commands/sync-files/) | Re-apply file operations to existing worktrees | | [`path`](/reference/commands/path/) | Get the filesystem path of a worktree | | [`shell`](/reference/commands/shell/) | Open a shell in a remote workspace | | [`dashboard`](/reference/commands/dashboard/) | TUI dashboard for monitoring agents | | [`sidebar`](/reference/commands/sidebar/) | Live agent status sidebar in tmux | | [`reap-agents`](/reference/commands/reap-agents/) | Exit tracked agent processes older than a threshold | | [`config edit`](/reference/commands/config/) | Edit the global configuration file | | [`init`](/reference/commands/init/) | Generate configuration file | | [`claude prune`](/reference/commands/claude/) | Clean up stale Claude Code entries | | [`remote`](/reference/commands/remote/) | Set up and manage remote hosts that run agents | | [`completions`](/reference/commands/completions/) | Generate shell completions | | [`docs`](/reference/commands/docs/) | Show detailed documentation | | [`update`](/reference/commands/update/) | Update workmux to the latest version | | [`last-done`](/reference/commands/last-done/) | Switch to the most recently completed agent | # add > Create git worktrees and tmux windows, with support for AI prompts and parallel generation Creates a new git worktree with a matching tmux window and switches you to it immediately. If the branch doesn’t exist, it will be created automatically. ```bash workmux add [flags] ``` ## Arguments [Section titled “Arguments”](#arguments) * ``: Name of the branch to create or switch to, a remote branch reference (e.g., `origin/feature-branch`), or a GitHub fork reference (e.g., `user:branch`). Remote and fork references are automatically fetched and create a local branch with the derived name. Fork references derive the local branch as `user-branch` (e.g., `someuser:feature` creates local branch `someuser-feature`). Optional when using `--pr`. ## Options [Section titled “Options”](#options) | Flag | Description | | ------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `--base ` | Specify a base branch, commit, or tag to branch from when creating a new branch. Overrides `base_branch` config. The config value `auto` uses the effective main branch. Without either setting, workmux uses the currently checked out branch. | | `--pr ` | Checkout a GitHub pull request or GitLab merge request into a worktree. Requires authenticated `gh` (GitHub) or `glab` 1.37.0 or newer (GitLab). Supports full URLs and custom local branch names, e.g., `workmux add review --pr 123`. | | `--forge ` | Select the provider for `--pr`. Numeric references use GitLab when origin is on gitlab.com, otherwise GitHub. Use `--forge gitlab` for numeric references on self-hosted GitLab. Full URLs identify the provider. | | `-A, --auto-name` | Generate branch name from prompt using LLM. See [Automatic branch name generation](#automatic-branch-name-generation). | | `--name ` | Override the worktree directory and default tmux target name. By default, these are derived from the branch name (slugified). Cannot be used with multi-worktree generation (`--count`, `--foreach`, or multiple `--agent`). | | `--target-name ` | Override the workmux-managed tmux target name for this command. In window mode, creates or selects window ``. In session mode, creates or selects session ``. Cannot be used with multi-worktree generation. | | `--parent-session ` | Window mode only. Creates the workmux-managed window inside the named tmux session without applying `window_prefix` to that parent session. Cannot be used with session mode or multi-worktree generation. | | `-b, --background` | Create the tmux window in the background without switching to it. Useful with `--prompt-editor`. | | `-w, --with-changes` | Move uncommitted changes from the current worktree to the new worktree, then reset the original worktree to a clean state. Useful when you’ve started working on main and want to move your branches to a new worktree. | | `--patch` | Interactively select which changes to move (requires `--with-changes`). Opens an interactive prompt for selecting hunks to stash. | | `-u, --include-untracked` | Also move untracked files (requires `--with-changes`). By default, only staged and modified tracked files are moved. | | `-p, --prompt ` | Provide an inline prompt that will be automatically passed to AI agent panes. | | `-P, --prompt-file ` | Provide a path to a file whose contents will be used as the prompt. | | `-e, --prompt-editor` | Open your `$EDITOR` (or `$VISUAL`) to write the prompt interactively. | | `--prompt-file-only` | Write the prompt file to `.workmux/PROMPT-.md` without injecting it into agent commands. No agent pane is required. Useful when your editor has an embedded agent that reads the prompt file directly. Can also be set in config with `prompt_file_only: true`. | | `-l, --layout ` | Use a named pane layout from config instead of the default panes. See [named layouts](/guide/configuration/#named-layouts). Cannot be combined with `--agent`. | | `-a, --agent ` | The agent(s) to use for the worktree(s). Can be specified multiple times to generate a worktree for each agent. Overrides the `agent` from your config file. | | `-W, --wait` | Block until the created tmux window is closed. Useful for scripting when you want to wait for an agent to complete its work. The agent can signal completion by running `workmux remove --keep-branch`. | | `-o, --open-if-exists` | If a worktree for the branch already exists, open it instead of failing. Similar to `tmux new-session -A`. Useful when you don’t know or care whether the worktree already exists. Any mode override is forwarded when reopening the existing worktree. | | `--mode ` | Override the multiplexer mode for this command only. Useful for forcing window mode when config defaults to sessions, or creating a one-off session without changing config. Session mode is only supported with tmux. | | `-s, --session` | Shorthand for `--mode session`. Cannot be combined with `--mode`. | | `--dry-run` | Print the resolved worktree path, branch, base, multiplexer target, file operations, and post-create hooks without creating or modifying anything. | | `--config ` | Use an alternate config file for this invocation. Still merges with global config. Useful for per-command config overrides like `workmux add feat/my-branch --config .workmux.window.yaml`. | | `-c, --continue` | Resume the agent’s most recent conversation at the destination worktree path. Can be combined with `-p` or `-P`. Cannot be combined with `--fork`. | | `--fork` | Fork the last conversation from the current worktree into the new one. The agent resumes with the forked conversation context. Use `--fork=` to fork a specific session (prefix matching supported). Supports Claude Code, Codex, and Pi. | | `--remote []` | Create the workspace on a [remote server](/guide/remote/). Without a name, uses the `placement` remote, or the only configured remote. Put the branch name first (`workmux add my-branch --remote`), since a bare `--remote` followed by the branch takes the branch as the remote name. | | `--local` | Create the workspace on this machine even when `placement` names a remote. | ## Skip options [Section titled “Skip options”](#skip-options) These options allow you to skip expensive setup steps when they’re not needed (e.g., for documentation-only changes): | Flag | Description | | -------------------- | --------------------------------------------------------------------- | | `-H, --no-hooks` | Skip running `post_create` commands | | `-F, --no-file-ops` | Skip file copy/symlink operations (e.g., skip linking `node_modules`) | | `-C, --no-pane-cmds` | Skip executing pane commands (panes open with plain shells instead) | ## What happens [Section titled “What happens”](#what-happens) 1. Determines the **handle** for the worktree by slugifying the branch name (e.g., `feature/auth` becomes `feature-auth`). This can be overridden with the `--name` flag. 2. Creates a git worktree at `/` (the `worktree_dir` is configurable and defaults to a sibling directory of your project; supports `~` and a `{project}` placeholder, e.g. `~/.workmux/{project}`) 3. Runs any configured file operations (copy/symlink) 4. Executes `post_create` commands if defined (runs before the tmux window/session opens, so keep them fast) 5. Creates a new tmux window named `` (e.g., `wm-feature-auth` with `window_prefix: wm-`). In window mode, `window_placement` controls whether the window is created after the calling window or at the right edge. With `--target-name`, the managed tmux target uses that name instead of ``. With `--parent-session`, a window-mode target is created inside that tmux session. With `--mode session` or `--session`, the worktree is created in its own dedicated tmux session. 6. Sets up your configured tmux pane layout 7. Automatically switches your tmux client to the new window In tmux window mode without `--parent-session`, `$TMUX_PANE` identifies the calling pane and its parent session. When `$TMUX_PANE` is absent or stale, workmux uses live pane working directories when their closest matches identify one session. A tmux server with one session is the final fallback. Remaining ambiguity requires `--parent-session `. The working directory selects the Git repository and only provides conservative evidence for tmux placement. ## Remote workspaces [Section titled “Remote workspaces”](#remote-workspaces) With `--remote`, or when `placement` names a remote, the worktree, its panes and the agent are created on a [remote server](/guide/remote/). The tmux window opens locally and relays to the remote session. The workspace starts from a local commit, so remote branch references aren’t accepted: fetch the branch, then pass a new branch name with `--base origin/`. Unpushed local commits are sent along. File operations and `post_create` hooks run on the remote, and agent isolation follows `sandbox.enabled` unless the remote explicitly overrides it. See [server or Docker](/guide/remote/setup/#server-or-docker). If an add fails part way, run the same command again to resume it. `--parent-session ` places the local relay window in that exact tmux session, creating it if needed. `--background` leaves focus unchanged. The parent is remembered for `open`, `close`, and `list`, including when run from another session. These options aren’t available for remote workspaces: `--headless`, `--sandbox`, `--pr`, `--with-changes`, `--fork`, `--continue`, `--open-if-exists`, `--target-name`, `--dry-run`, session mode, and the `windows:` config. Remote workspaces need the tmux backend. ## Resume a session at a recreated worktree path [Section titled “Resume a session at a recreated worktree path”](#resume-a-session-at-a-recreated-worktree-path) Use `--continue` for follow-up work after a worktree has been merged or removed: ```bash workmux add auth-module --name auth-module --continue -b -P followup.md ``` Use the same absolute worktree path and agent as the previous session. If the original handle was explicit, preserve it with `--name`. The agent resumes its most recent conversation for that path while Git creates the worktree using the normal branch/base rules. Session history must still exist in the agent’s storage; the agent determines what happens if no matching session exists. Unlike `--fork`, which copies context from the source worktree, `--continue` resumes context belonging to the destination path. Continuation uses the same agent-specific flags as `workmux open --continue`. It is not supported when invoking `add` from inside a sandbox guest. ## Examples [Section titled “Examples”](#examples) * Basic usage ```bash # Create a new branch and worktree workmux add user-auth # Use an existing branch workmux add existing-work # Create a new branch from a specific base workmux add hotfix --base production # Create a worktree from a remote branch (creates local branch "user-auth-pr") workmux add origin/user-auth-pr # Remote branches with slashes work too (creates local branch "feature/foo") workmux add origin/feature/foo # Preview the resolved plan without creating anything workmux add feature/parallel-task --dry-run # Create a worktree in the background without switching to it workmux add feature/parallel-task --background # Use a custom name for the worktree directory and default tmux target workmux add feature/long-descriptive-branch-name --name short # Use a custom window name while keeping the branch-derived worktree path workmux add feature/long-descriptive-branch-name --target-name review-short # Create a custom-named window inside an existing PR review session workmux add feature/review --parent-session prs --target-name review-123 # Open existing worktree if it exists, create if it doesn't (idempotent) workmux add my-feature -o ``` * Pull requests & forks ```bash # Checkout PR #123. Same-repo PRs use the PR's branch name; # fork PRs are prefixed with the owner (e.g., "forkowner-main"). workmux add --pr 123 # Checkout a pull request from its full GitHub URL with a custom local branch workmux add --pr https://github.com/raine/workmux/pull/456 fix/api-bug # Checkout a GitLab.com MR by number (origin points to gitlab.com) workmux add --pr 123 # Checkout a self-hosted GitLab MR by number workmux add --pr 123 --forge gitlab # Checkout a self-hosted GitLab MR by URL, including nested groups workmux add --pr https://gitlab.example.com/team/services/project/-/merge_requests/123 # Checkout a fork branch using GitHub's owner:branch format (copy from GitHub UI) # Creates local branch "someuser-feature-branch" tracking the fork workmux add someuser:feature-branch ``` GitLab MR URLs must match the project that `glab` resolves from `origin`. Workmux gives `glab` a disposable Git context containing only that remote, so other remotes cannot select a different project. Repository/host environment overrides and CI auto-login are disabled for these lookups. `glab` handles authentication, SSH aliases, and configured SSH/API host mappings. Configure self-hosted API protocols and ports in `glab`. The minimum supported version is 1.37.0; configured `ssh_host` mappings require 1.90.0 or newer. Both GitLab and GitHub CLIs may be installed; provider selection does not depend on which executable is available. Same-project GitLab MRs use the source branch name. Fork MRs use `gitlab--` by default, with a remote for the actual source project. Pass a branch name to override this. Checkout first fetches `refs/merge-requests//head` from origin, then explicitly fetches the source branch if that ref is unavailable. The source project must be accessible; its source branch may be deleted if the MR head ref remains available. `--dry-run` reads MR metadata without adding remotes, fetching Git refs, or creating worktrees. GitLab integration covers `add --pr`; PR status displays and the dashboard’s PR picker use GitHub. * Moving changes ```bash # Move uncommitted changes to a new worktree (including untracked files) workmux add feature/new-thing --with-changes -u # Move only staged/modified files (not untracked files) workmux add fix/bug --with-changes # Interactively select which changes to move workmux add feature/partial --with-changes --patch ``` * AI agent prompts ```bash # Create a worktree with an inline prompt for AI agents workmux add feature/ai --prompt "Implement user authentication with OAuth" # Override the default agent for a specific worktree workmux add feature/testing -a gemini # Create a worktree with a prompt from a file workmux add feature/refactor --prompt-file task-description.md # Open your editor to write a prompt interactively workmux add feature/new-api --prompt-editor # Write prompt file only (for editors with embedded agents like neovim) workmux add feature/task -P task.md --prompt-file-only ``` * Skip setup steps ```bash # Skip expensive setup for documentation-only changes workmux add docs-update --no-hooks --no-file-ops --no-pane-cmds # Skip just the file operations (e.g., you don't need node_modules) workmux add quick-fix --no-file-ops ``` * Scripting with --wait ```bash # Block until the agent completes and closes the window workmux add feature/api --wait -p "Implement the REST API, then run: workmux remove --keep-branch" # Use in a script to run sequential agent tasks for task in task1.md task2.md task3.md; do workmux add "task-$(basename $task .md)" --wait -P "$task" done ``` * Session mode ```bash # Create a worktree in its own tmux session (instead of the current session) workmux add feature/isolated --mode session # Create a session-mode worktree with a custom session target workmux add feature/review --mode session --target-name review-123 # Override a session-mode config for one command and keep a normal window workmux add feature/quick-fix --mode window # Create in a new session without switching to it workmux add feature/background-task --mode session --background # Session mode works with all other flags workmux add feature/ai-session --mode session -p "Implement the new API" ``` ## AI agent integration [Section titled “AI agent integration”](#ai-agent-integration) When you provide a prompt via `--prompt`, `--prompt-file`, or `--prompt-editor`, workmux automatically injects the prompt into panes running the configured agent command (e.g., `claude`, `codex`, `copilot`, `opencode`, `gemini`, `agy`, `kiro-cli`, `vibe`, `pi`, `omp`, `grok`, or whatever you’ve set via the `agent` config or `--agent` flag) without requiring any `.workmux.yaml` changes: * Panes with a command matching the configured agent are automatically started with the given prompt. * You can keep your `.workmux.yaml` pane configuration simple (e.g., `panes: [{ command: "" }]`) and let workmux handle prompt injection at runtime. This means you can launch AI agents with task-specific prompts without modifying your project configuration for each task. If your editor has an embedded agent (e.g., neovim with an agent plugin), use `--prompt-file-only` to write the prompt to `.workmux/PROMPT-.md` without requiring an agent pane. Your editor can then detect and consume the file on startup. This can also be set permanently in config with `prompt_file_only: true`. ## Automatic branch name generation [Section titled “Automatic branch name generation”](#automatic-branch-name-generation) The `--auto-name` (`-A`) flag generates a branch name from your prompt using an LLM. The tool used depends on your configuration: 1. `auto_name.command` is set: uses that command as-is 2. `config.agent` is a known agent (`claude`, `gemini`, `agy`, `codex`, `opencode`, `kiro-cli`, `vibe`, `pi`, `omp`): uses the agent’s CLI with a fast/cheap model 3. Neither: falls back to the [`llm`](https://llm.datasette.io/) CLI tool ### Usage [Section titled “Usage”](#usage) ```bash # Opens editor for prompt, generates branch name workmux add -A # With inline prompt workmux add -A -p "Add OAuth authentication" # With prompt file workmux add -A -P task-spec.md ``` ### Requirements [Section titled “Requirements”](#requirements) When `agent` is configured (e.g., `agent: claude`), workmux automatically uses that agent’s CLI for branch naming. No additional setup is required beyond having the agent installed. If no agent is configured and no `auto_name.command` is set, workmux uses the `llm` CLI tool: ```bash pipx install llm ``` Configure a model (e.g., OpenAI): ```bash llm keys set openai # Or use a local model llm install llm-ollama ``` If you set `auto_name.command`, `llm` is not required. Any tool that accepts a prompt and outputs a branch name will work. ### Agent profile defaults [Section titled “Agent profile defaults”](#agent-profile-defaults) When an agent is configured, these commands are used automatically: | Agent | Auto-name command | | ---------- | ---------------------------------------------------------------------------- | | `claude` | `claude --model haiku --no-session-persistence -p` | | `gemini` | `gemini -m gemini-2.5-flash-lite -p` | | `codex` | `codex exec --ephemeral --config model_reasoning_effort="low" -m gpt-6-luna` | | `opencode` | `opencode run` | | `kiro-cli` | `kiro-cli chat --no-interactive` | | `pi` | `pi --no-session -p` | | `omp` | `omp --no-session -p` | To override back to `llm` when an agent is configured, set `auto_name.command: "llm"`. ### Configuration [Section titled “Configuration”](#configuration) Optionally configure auto-name behavior in `.workmux.yaml`: ```yaml auto_name: model: "gemini-2.5-flash-lite" background: true # Always run in background when using --auto-name system_prompt: | Generate a concise git branch name based on the task description. Rules: - Use kebab-case (lowercase with hyphens) - Keep it short: 1-3 words, max 4 if necessary - Focus on the core task/feature, not implementation details - No prefixes like feat/, fix/, chore/ Examples of good branch names: - "Add dark mode toggle" → dark-mode - "Fix the search results not showing" → fix-search - "Refactor the authentication module" → auth-refactor - "Add CSV export to reports" → export-csv - "Shell completion is broken" → shell-completion Output ONLY the branch name, nothing else. ``` #### Using a custom command [Section titled “Using a custom command”](#using-a-custom-command) Set `auto_name.command` to use a specific tool for branch name generation. The command string is split into program and arguments, and the composed prompt (system prompt + user input) is piped via stdin. Valid Git branch names are preserved, including slash-separated prefixes such as `fix/issue-123`. ```yaml # Use Claude CLI auto_name: command: "claude -p" # Use Gemini CLI auto_name: command: "gemini" # Use a custom script auto_name: command: "/path/to/my-script --format branch-name" # Force llm even when an agent is configured auto_name: command: "llm" ``` When `command` is set to anything other than `"llm"`, the `model` option is ignored since it is specific to the `llm` CLI. | Option | Description | Default | | --------------- | ---------------------------------------------------------------- | -------------------------- | | `command` | Command for branch name generation (overrides agent profile) | Agent profile or `llm` CLI | | `model` | LLM model to use with the `llm` CLI (ignored when `command` set) | `llm`’s default | | `background` | Always run in background when using `--auto-name` | `false` | | `system_prompt` | Custom system prompt for branch name generation | Built-in prompt | Recommended models for fast, cheap branch name generation (with `llm`): * `gemini-2.5-flash-lite` (recommended) * `gpt-5-nano` ## Parallel workflows & multi-worktree generation [Section titled “Parallel workflows & multi-worktree generation”](#parallel-workflows--multi-worktree-generation) workmux can generate multiple worktrees from a single `add` command, which is ideal for running parallel experiments or delegating tasks to multiple AI agents. This is controlled by four mutually exclusive modes: * (`-a`, `--agent`): Create a worktree for each specified agent. * (`-n`, `--count`): Create a specific number of worktrees. * (`--foreach`): Create worktrees based on a matrix of variables. * **stdin**: Pipe input lines to create worktrees with templated prompts. When using any of these modes, branch names are generated from a template, and prompts can be templated with variables. ### Multi-worktree options [Section titled “Multi-worktree options”](#multi-worktree-options) | Flag | Description | | ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `-a, --agent ` | When used multiple times, creates one worktree for each agent. | | `-n, --count ` | Creates `` worktree instances. Can be combined with a single `--agent` flag to apply that agent to all instances. | | `--foreach ` | Creates worktrees from a variable matrix string. The format is `"var1:valA,valB;var2:valX,valY"`. All value lists must have the same length. Values are paired by index position (zip, not Cartesian product): the first value of each variable goes together, the second with the second, etc. | | `--branch-template