OpenCode embedded runtime unavailable on Docker installs: 'opencode' executable missing from image ('Load backends' always 503s)
Summary
On Docker installs, the OpenCode agent card's "Load backends" (console Settings → Agents, #1962) always fails with:
API error 503 (/api/providers/opencode/credentials): {"error":"Embedded OpenCode runtime unavailable"}Server log:
Error: Executable not found in $PATH: "opencode"
at createOpencodeServer (/app/node_modules/@opencode-ai/sdk/dist/server.js:12:18)
at startEmbeddedOpencode (/app/packages/providers/src/community/opencode/runtime.ts:40:16)
errorClass ENOENT, spawnargs ["serve","--hostname=127.0.0.1","--port=50466"]
msg: "providers.opencode_credentials_introspect_failed"What works
The UI side shipped in #1962 behaves exactly as designed: the card is not stuck loading — the 503 surfaces ~5 s after clicking "Load backends" as an inline error with a working Retry button (verified on archon.dynamous.ai, dev @ 7dfdf684).
Defect
The Docker image bundles @opencode-ai/sdk (and the provider is registered, selectable as an agent/assistant everywhere), but the opencode CLI executable the SDK spawns is not installed in the image. So on Docker installs the OpenCode provider can never start: credentials introspection 503s, and any chat/workflow run with provider opencode will fail the same way.
Either:
- install the
opencodebinary in the Docker image, or - treat OpenCode as unavailable on installs without the binary (e.g. degrade the registration / mark the agent card "runtime not installed" instead of a 503-shaped error), or both.
Repro: any Docker install → console Settings → Agents → OpenCode → "Load backends".
Related: #1962 (agent cards), #1958 (provider SDK bumps — @opencode-ai/sdk 1.14 → 1.17, but the missing binary predates that).
Source: coleam00/Archon