GOAL.md's first gap: without a runner a standalone image is a read-only viewer, because launching `claude -p` needed a host-side process. The Claude Code CLI is a self-contained native binary, so the image can just carry it — and the *same* sidecar/sidecar.py the homelab runs on its host runs in-container against it. With RUNNER_IN_CONTAINER=1 (the standalone default) docker-entrypoint.sh starts the runner on the loopback, mints a SIDECAR_TOKEN if none was given, overrides SIDECAR_URL to point at it, and gives the CLI a writable $HOME on the data volume. The transcripts it writes there become a third live source (RUNNER_TRANSCRIPTS_DIR → SOURCE_DIRS), so an in-container session streams into the viewer like any other. Verified end to end: a standalone container (workspace + data, no homelab, no host sidecar) spawns a session, the CLI runs it, and the turn renders in the conversation list with its model tag. The CLI authenticates from ANTHROPIC_API_KEY or a Claude home mounted at RUNNER_HOME. The homelab is unchanged: it leaves the flag off and keeps its host sidecar, which is what lets a run use the host's own hooks, skills and credentials. standalone-smoke.sh now also asserts the CLI is on PATH and the runner is healthy — the packaging property that would otherwise regress silently. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
3.6 KiB
3.6 KiB