You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Summary
Adds explicit runtime type distinction between Local (project-directory)
and Worktree (isolated git worktrees):
- **Local runtime**: Uses project directory directly, no isolation.
Creation is a no-op (just "use this directory"), delete is a no-op
(won't delete user's project). Good for existing repos where user wants
to work in-place.
- **Worktree runtime**: Creates isolated git worktrees under
`~/.mux/src/<project>/<branch>`. Existing behavior, now made explicit.
- **SSH runtime**: Unchanged, remote execution.
## Changes
- `RuntimeMode` now includes `"local" | "worktree" | "ssh"`
- Extracted `LocalBaseRuntime` for shared exec/file operations between
Local and Worktree
- `LocalRuntime` uses project path directly (no-op create/delete)
- `WorktreeRuntime` manages git worktrees (renamed from old
LocalRuntime)
- UI shows Local/Worktree/SSH options in creation controls
- Updated VS Code extension to handle all runtime types with appropriate
icons
- Runtime badges: SSH (server icon), Worktree (git branch icon), Local
(no badge)
## Backward Compatibility
- `type: "local"` with `srcBaseDir` = legacy worktree config (still
works)
- `type: "local"` without `srcBaseDir` = new project-dir runtime
- `type: "worktree"` = explicit worktree (new workspaces)
Users can upgrade/downgrade without breaking existing workspaces.
_Generated with `mux`_
---------
Co-authored-by: Michael Suchacz <203725896+ibetitsmike@users.noreply.github.com>
Local runtime runs the agent directly in your project directory—the same directory you use for development. There's no worktree isolation; the agent works in your actual working copy.
4
+
5
+
## When to Use
6
+
7
+
- Quick one-off tasks in your current working copy
8
+
- Reviewing agent work alongside your own uncommitted changes
9
+
- Projects where worktrees don't work well (e.g., some monorepos)
10
+
11
+
## Caveats
12
+
13
+
⚠️ **No isolation**: Multiple local workspaces for the same project see and modify the same files. Running them simultaneously can cause conflicts. mux shows a warning when another local workspace is actively streaming.
14
+
15
+
⚠️ **Affects your working copy**: Agent changes happen in your actual project directory.
16
+
17
+
## Filesystem
18
+
19
+
The workspace path is your project directory itself. No additional directories are created.
Copy file name to clipboardExpand all lines: docs/runtime/ssh.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,17 @@
1
-
# SSH Workspaces
1
+
# SSH Runtime
2
2
3
3
mux supports using remote hosts over SSH for workspaces. When configured, all tool operations will
4
4
execute over SSH and the agent is securely isolated from your local machine.
5
5
6
-
Our security architecture considers the remote machine potentially hostile. No keys or credentials are implicitly transferred there—just the git archive and [Project Secrets](./project-secrets.md).
6
+
Our security architecture considers the remote machine potentially hostile. No keys or credentials are implicitly transferred there—just the git archive and [Project Secrets](../project-secrets.md).
7
7
8
8
We highly recommend using SSH workspaces for an optimal experience:
9
9
10
10
-**Security**: Prompt injection risk is contained to the credentials / files on the remote machine.
11
-
- SSH remotes pair nicely with [agentic git identities](./agentic-git-identity.md)
11
+
- SSH remotes pair nicely with [agentic git identities](../agentic-git-identity.md)
12
12
-**Performance**: Run many, many agents in parallel while maintaining good battery life and UI performance
Copy file name to clipboardExpand all lines: docs/runtime/worktree.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
-
# Local Workspaces
1
+
# Worktree Runtime
2
2
3
-
Local workspaces use[git worktrees](https://git-scm.com/docs/git-worktree) on your local machine. Worktrees share the `.git` directory with your main repository while maintaining independent working changes and checkout state.
3
+
Worktree runtime uses[git worktrees](https://git-scm.com/docs/git-worktree) on your local machine. Worktrees share the `.git` directory with your main repository while maintaining independent working changes and checkout state.
4
4
5
5
## How Worktrees Work
6
6
@@ -10,7 +10,7 @@ It's important to note that a **worktree is not locked to a branch**. The agent
10
10
11
11
## Filesystem Layout
12
12
13
-
Local workspaces are stored in `~/.mux/src/<project-name>/<workspace-name>`.
13
+
Worktree workspaces are stored in `~/.mux/src/<project-name>/<workspace-name>`.
Copy file name to clipboardExpand all lines: docs/workspaces.md
+11-8Lines changed: 11 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,20 +2,23 @@
2
2
3
3
Workspaces in mux provide isolated development environments for parallel agent work. Each workspace maintains its own Git state, allowing you to explore different approaches, run multiple tasks simultaneously, or test changes without affecting your main repository.
4
4
5
-
## Workspace Types
5
+
## Runtimes
6
6
7
-
mux supports two workspace backends:
7
+
mux supports three [runtime types](./runtime.md):
8
8
9
-
-**[Local Workspaces](./local.md)**: Use [git worktrees](https://git-scm.com/docs/git-worktree) on your local machine. Worktrees share the `.git` directory with your main repository while maintaining independent working changes.
9
+
-**[Local](./runtime/local.md)**: Run directly in your project directory. No isolation—best for quick edits to your working copy.
10
10
11
-
-**[SSH Workspaces](./ssh.md)**: Regular git clones on a remote server accessed via SSH. These are completely independent repositories stored on the remote machine.
11
+
-**[Worktree](./runtime/worktree.md)**: Isolated directories using [git worktrees](https://git-scm.com/docs/git-worktree). Worktrees share `.git` with your main repository while maintaining independent working changes.
12
12
13
-
## Choosing a Backend
13
+
-**[SSH](./runtime/ssh.md)**: Remote execution over SSH. Ideal for heavy workloads, security isolation, or leveraging remote infrastructure.
14
14
15
-
The workspace backend is selected when you create a workspace:
15
+
## Choosing a Runtime
16
16
17
-
-**Local**: Best for fast iteration, local testing, and when you want to leverage your local machine's resources
18
-
-**SSH**: Ideal for heavy workloads, long-running tasks, or when you need access to remote infrastructure
17
+
The runtime is selected when you create a workspace:
18
+
19
+
-**Local**: Quick tasks in your current working copy
20
+
-**Worktree**: Best for parallel agent work with isolation
21
+
-**SSH**: Heavy workloads, security, or remote infrastructure
0 commit comments