Skip to content

HarnessRouter Community Edition: the self-hosted, Apache-2.0 edition of the unified interface for agent harnesses. Run Codex, Claude Code, Hermes, PI, DSH, and more through one API, with sessions, streaming, files, cancellation, and failure handling. Implements the Unified Harness Protocol (UHP), an open standard. Your keys, your infrastructure.

fix(docker): opencode installs by default, and the backend docs were stale

richard-epsilla842381c991c9
diff --git a/Dockerfile b/Dockerfile
index 74c5dd5a..57c2e123 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -17,8 +17,8 @@
# They land in the data volume, so the cost is paid once per volume rather than once per start.
# Choose backends at RUN time:
#
-# docker run -e HR_BACKENDS=claude,codex,hermes ... # default: all three
-# docker run -e HR_BACKENDS=claude ... # lean
+# docker run -e HR_BACKENDS=claude,codex,hermes,pi,dsh,opencode ... # the default
+# docker run -e HR_BACKENDS=opencode ... # lean
#
# WITH_BROWSER is still a build arg because Chromium and its system libraries genuinely belong
# in the image layer.
diff --git a/README.md b/README.md
index 8f80fc43..115a948c 100644
--- a/README.md
+++ b/README.md
@@ -570,13 +570,17 @@ Backends are installed into your data volume rather than baked into the image, s
want is a run-time setting:
```bash
-docker run -e HR_BACKENDS=claude,codex,hermes ... # the default
+docker run -e HR_BACKENDS=claude,codex,hermes,pi,dsh,opencode ... # the default
+docker run -e HR_BACKENDS=opencode ... # lean
```
-**Known issue: any value that leaves out `hermes` makes the container exit immediately**
-with status 1 and no error message. `claude`, `codex` and `claude,codex` all do it, and the last
-line in the log is the install line for the backend it was working on, so it reads as if the
-install killed it, which it did not. Until that is fixed, leave `HR_BACKENDS` unset.
+A backend that fails to install is not fatal: the others still work, and the console offers what
+the gateway's catalogue lists, so an unavailable backend simply is not shown.
+
+Previously documented here: that any value leaving out `hermes` made the container exit
+immediately with status 1. That no longer reproduces. Checked 2026-08-25 on a fresh volume with
+`HR_BACKENDS=codex` (one of the values named) and with `HR_BACKENDS=opencode`: both reach a healthy
+container with zero restarts and a gateway serving 200.
Chromium is genuinely an image layer, so it stays a build flag:
diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh
index 92620b39..52d372df 100644
--- a/docker/entrypoint.sh
+++ b/docker/entrypoint.sh
@@ -172,7 +172,7 @@ export HOSTNAME=0.0.0.0
TOOLS="$DATA_DIR/agent-tools"
export PATH="$TOOLS/bin:$PATH"
export NODE_PATH="$TOOLS/lib/node_modules"
-export HR_BACKENDS="${HR_BACKENDS:-claude,codex,hermes,pi,dsh}"
+export HR_BACKENDS="${HR_BACKENDS:-claude,codex,hermes,pi,dsh,opencode}"
wanted() { [[ ",$HR_BACKENDS," == *",$1,"* ]]; }
# The executable IS the definition of "installed" — an installer that exits 0 without producing
@@ -242,9 +242,7 @@ install_backends() {
fi
# opencode is MIT, so unlike Claude Code and hermes it COULD be baked into the image. It is
- # installed here anyway to keep one install path for every backend, and it is deliberately not in
- # the default HR_BACKENDS: the gateway has no model catalogue for it yet (that needs a real probed
- # turn), so installing it by default would ship a CLI nothing can route to. Opt in explicitly.
+ # installed here anyway so that every backend has ONE install path.
if wanted opencode && [ ! -x "$(backend_bin opencode)" ]; then
echo "[harnessrouter] installing opencode (MIT)…"
try_install "opencode" install_opencode || true