Repository navigation
feat: let sessions share a sandbox, and run one in its own git worktree - #37
Merged
insertt merged 3 commits intoDec 2, 2026
Merged
Conversation
insertt
force-pushed
the
feat/shared-sandbox-worktrees
branch
from
December 2, 2026 17:18
ddc0cf0 to
e4a438b
Compare
insertt
force-pushed
the
feat/shared-sandbox-worktrees
branch
from
December 2, 2026 19:11
2a47f25 to
f0f0f8f
Compare
Sessions of one sandbox no longer exclude each other. A setup lock keeps two from setting the sandbox up at once, each attached session holds its own lock, and one leader runs the network prompt bridge, the status refresher and the nightly updater for all of them, handing over when it ends. Recreating, switching to a newer nightly image and disposing of a dedicated scratch sandbox wait until the session is alone. The sandbox record is changed under a lock so concurrent sessions keep each other's changes, and `sand status` lists every attached session.
`sand <harness> --worktree[=NAME]` starts the agent in a git worktree of the primary workspace, on a new or named branch, kept in sand's directory for the sandbox and mounted at the same path inside it. A worktree with no work left is removed when its session ends; `sand worktree ls` and `sand worktree rm` list and remove the others.
On Windows git lists worktrees with forward slashes, so looking for the backslashed path in its output failed. Read the porcelain list and compare canonical paths, as the code itself does.
insertt
force-pushed
the
feat/shared-sandbox-worktrees
branch
from
December 2, 2026 20:30
f0f0f8f to
c2d35a4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #36; the base will move to
mainonce that merges.feat: let several sessions share a sandbox
Sessions of one sandbox no longer exclude each other. A setup lock keeps two
from setting the sandbox up at once, each attached session holds its own
lock, and one leader runs the network prompt bridge, the status refresher and
the nightly updater for all of them, handing over when it ends. Recreating,
switching to a newer nightly image and disposing of a dedicated scratch
sandbox wait until the session is alone. The sandbox record is changed under
a lock so concurrent sessions keep each other's changes, and
sand statuslists every attached session.
feat: run a session in its own git worktree with --worktree
sand <harness> --worktree[=NAME]starts the agent in a git worktree of theprimary workspace, on a new or named branch, kept in sand's directory for the
sandbox and mounted at the same path inside it. A worktree with no work left
is removed when its session ends;
sand worktree lsandsand worktree rmlist and remove the others.
Checked locally on stable Rust:
cargo fmt --check,cargo clippy --all-targets --locked(with-D warnings) andcargo test --lockedpass.