OpenCode overlay for a shell workload, with native ACP, provider credentials, and MCP setup.
10K+
OpenCode overlay for a shell workload, with native ACP, provider credentials, and MCP setup.
| Name | Required | Default | Description |
|---|---|---|---|
model | Optional | | OpenCode model as provider/model (opencode.json `model`); empty keeps the CLI default |
reasoningEffort | Optional | | Model variant such as high or max (opencode.json `model` suffix); needs model; empty keeps the model default |
version | Required | — | OpenCode release the image carries |
[email protected]| Type | Required | Description | |
|---|---|---|---|
com.docker.sandbox/network-policy@1 | Required | — | |
com.docker.sandbox/credential@1 | Optional | GitHub and Copilot access | |
com.docker.sandbox/credential@1 | Optional | Google AI API access | |
com.docker.sandbox/credential@1 | Optional | Groq API access | |
com.docker.sandbox/credential@1 | Optional | OpenAI API access (API key or ChatGPT OAuth) | |
com.docker.sandbox/credential@1 | Optional | Anthropic API access | |
com.docker.sandbox/credential@1 | Optional | OpenRouter API access | |
com.docker.sandbox/credential@1 | Optional | xAI API access | |
com.docker.sandbox/lifecycle@1 | Required | — | |
com.docker.sandbox/agent-skills@1 | Optional | — | |
com.docker.sandbox/agent-context@1 | Optional | — | |
com.docker.sandbox/agent-context@2 | Optional | — | |
com.docker.sandbox/acp@1 | Optional | — | |
deb/jq, deb/util-linuxsbx run <agent> --kit sbx/opencode-mixin:latestRun the following command to install sbx on your machine.
brew install docker/tap/sbxwinget install Docker.sbxThis v3 mixin Kit packages OpenCode for Docker Sandboxes. It adds the agent, authentication configuration, and runtime integration to a compatible workload. The workload keeps its entrypoint.
This Kit is built on Docker Hardened Images.
sbx run sbx/shell:latest --kit sbx/opencode-mixin:latest /path/to/workspace
When the shell opens, run opencode. This kit supplies an overlay, so it needs a workload such as
Shell.
To run a single prompt inside the shell:
opencode run "Summarize this repository"
The kit configures OpenCode to allow tool execution without approval prompts.
Set these arguments when creating the sandbox with --kit-arg <name>=<value>. Repeat the flag for multiple arguments.
Use --kit-arg <kit>.<name>=<value> to target one kit in a composition, as in the example below.
| Argument | Default | Description | Accepted values |
|---|---|---|---|
model | "" | OpenCode model as provider/model (opencode.json model); empty keeps the CLI default | Empty, or a provider/model value. Letters, digits, ., _, /, :, and -. |
reasoningEffort | "" | Model variant such as high or max; needs model; empty keeps the model default | Letters, digits, ., _, and -. |
An empty value keeps the agent default. The model must be available to your provider account. OpenCode applies an effort
as a variant of a named model, and each model has its own variant names, so reasoningEffort needs model and the
sandbox is not created without it. These are kit configuration inputs, separate from agent command-line arguments passed
after --.
sbx run sbx/shell:latest --kit sbx/opencode-mixin:latest \
--kit-arg opencode-mixin.model=anthropic/claude-sonnet-4-5 --kit-arg opencode-mixin.reasoningEffort=high \
/path/to/workspace
The kit writes the selection to ~/.config/opencode/opencode.json as provider/model#variant when the sandbox is
created and keeps the other settings in that file.
Bind the provider credentials you use on the host. Supported services are github, google, groq, openai,
anthropic, openrouter, and xai. For example, run sbx secret set anthropic. OpenAI also supports a ChatGPT OAuth
credential through sbx secret set openai --oauth. Host-bound credentials remain proxy-managed.
A host github credential also enables OpenCode's GitHub Copilot model provider. Configure it with
sbx secret set github on the host. The credential needs access to Copilot.
When the runtime supplies an MCP gateway, the kit registers it automatically in ~/.config/opencode/opencode.json.
Existing unrelated settings and server entries are preserved.
ACP support is included. Configure an ACP client to open a non-TTY stream to the sandbox.
sbx exec -i <sandbox> opencode acp
The sandbox supplies the isolation for agent tool execution. Launch the kit through Docker Sandboxes and configure extra tool or MCP destinations in the runtime network policy as needed.
If a tool cannot reach a service, run sbx policy log on the host to identify blocked destinations. Additional
language-server downloads may need extra destinations in the runtime network policy.
The agent owns the OpenCode install. To move to a newer release inside a sandbox, run opencode upgrade. A new sandbox
starts from the release this Kit pins.
sbx/opencode provides the complete agent workload.For the Kit format and capability contracts, see the Sandbox Kit v3 specification.
For runtime setup, see the Docker Sandboxes documentation. For provenance, SBOM, VEX, and image verification, see the Docker Hardened Images documentation.
OpenCode is an open-source coding agent. Product names and logos do not imply sponsorship or endorsement.