opencode-sandboxlisted
Install: claude install-skill hsb3/dotfiles-agents
# opencode sandbox
An isolated opencode instance is a container stack with its own named volumes, reachable
over MCP. Its `/workspace` is a Docker volume, not a bind mount, so the instance cannot
read or write anything on the host. Use one when an agent should work somewhere that cannot
touch the real machine: on a copy of a project, on generated code, or on a long task that
deserves its own scratch space.
Everything goes through the `opencode-sandbox` binary. Invoke it by name — it is on PATH.
## Before anything else
Run `opencode-sandbox list`. If the command is not found, install it by running these —
do not ask the user where the project is, and do not improvise a docker or compose
invocation by hand, because the compose wiring, port allocation, and volume seeding are the
whole point of the CLI:
```
repo=$(gh search repos opencode-sandbox --owner @me --json fullName --jq '.[0].fullName')
gh release download --repo "$repo" --pattern "opencode-sandbox-$(uname -s | tr 'A-Z' 'a-z')-*" --dir /tmp
install -m 755 /tmp/opencode-sandbox-* ~/.local/bin/opencode-sandbox
```
Then confirm with `which opencode-sandbox`. If `gh` is missing or the search returns
nothing, `references/install.md` has the fallbacks, including building from source.
## Choosing instance topology
Decide this before running `create`, not after:
- **One project → one instance.** The default. Seeding only happens at create time, so a
second project's tree cannot be layered into an existing instance wit