Skip to content

The workspace image

What the workspace image contains, and what it does not contain.

Updated

The workspace image is small on purpose. It is Debian bookworm-slim with a few tools. The base image digest, the tini version, the OpenCode version, Node and mise are pinned. A snapshot restores only onto the image it came from.

Installed

Item Notes
OpenCode 2.2.7 The linux x64 release asset that the official installer downloads, checked against a pinned SHA-256. A different file fails the build. opencode on the PATH adds the model config, then runs the real binary.
git
gh The GitHub CLI. It reads GH_TOKEN, which holds a placeholder.
Node 22 node, npm, npx and corepack, from the nodejs.org release, checked against a pinned SHA-256.
mise For a project that pins another version of Node or another tool. It installs nothing by itself: run mise trust && mise install in the project. It reads mise.toml, .tool-versions, .nvmrc and .node-version. Its shims are first on the PATH, so the pinned version is the one that runs.
python3 With the websocket module, for the Chrome DevTools Protocol of a browser session. The module sends the Worker’s own origin, which the Worker needs.
curl
ripgrep The command rg.
jq
unzip
less
tmux cf-opencode shell uses it.
openssh-server sshd runs per connection with sshd -i. It never listens.
sudo user has passwordless sudo.
tini PID 1.
bash, procps, ca-certificates, libnss-myhostname Base tools.

Commands for the agent

The image has these commands. The agent uses them. You can run them in cf-opencode shell too.

Command Usage What it does
cf-opencode-search cf-opencode-search [-n 1..10] [--provider exa|linkup|ceramic] [--json] <query> Searches the web. See Web search and browsing.
cf-opencode-fetch cf-opencode-fetch [--links|--html|--screenshot <file>|--pdf <file>] [--max-chars <n>] <url> Reads a page through a real browser. It also reads a dev server of this workspace. See Web search and browsing.
cf-opencode-browse cf-opencode-browse [--preview <port>]... Opens a remote browser session and prints its websocket address. See Web search and browsing.
cf-opencode-preview cf-opencode-preview <port> Prints the preview URL of a dev server, and checks that the port listens on 0.0.0.0. See Preview a dev server.
cf-opencode-notify cf-opencode-notify "<text>" Sends a note to the notify URL. See Hand off a task.

opencode on the PATH is a small wrapper. It adds the model config, then runs the real OpenCode binary.

Not installed

The image has no compilers. It has no language toolchain other than Node and Python 3. mise can install one in the home folder, for example mise use python@3.13.

Ask the agent to install what the project needs. The user account has passwordless sudo:

sudo apt-get update && sudo apt-get install -y build-essential

The snapshot keeps installed packages. rebuild does not carry packages outside /home/user. See Upgrade and rebuild.

Users and paths

  • user (uid 1000) runs OpenCode, the shell and the SSH login.
  • The home folder is /home/user. The default project path is /home/user/project.
  • The container starts as root. The entrypoint trusts the egress CA, then the Worker starts opencode serve as user.
  • opencode serve listens on port 4096.

Size

The default container has 2 vCPU, 6 GiB of memory and a 20 GB disk. You can change it with instance. See Configuration.

Type to search…

↑↓ navigate↵ selectEsc close