From 61d6cde40fc4603826ea33e025f2032dc21d083c Mon Sep 17 00:00:00 2001 From: Renn F Date: Sun, 21 Jun 2026 09:40:54 +0200 Subject: [PATCH] fix(docker): pre-create ~/.claude.json in the agent base image MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Claude Code prints "configuration file not found at ~/.claude.json" (3x) at startup when that sibling file is absent. The orchestrator only bind-mounts the host copy when it exists, and delivery agents (unlike intake/secretary, which pre-create it in Python) launch the CLI directly with no wrapper — so when the host file is gone the warning floods every agent's logs. Pre-create an empty {} config in the image; the host mount still overrides it when present and the CLI self-heals the file. --- docker/agent-base.Dockerfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docker/agent-base.Dockerfile b/docker/agent-base.Dockerfile index 293f1df6..d4ea2fc3 100644 --- a/docker/agent-base.Dockerfile +++ b/docker/agent-base.Dockerfile @@ -81,6 +81,12 @@ USER agent # a per-agent sandbox that only mounts its own workspace. RUN git config --global --add safe.directory '*' +# Claude Code reads ~/.claude.json (a sibling FILE, not under ~/.claude/). The +# orchestrator bind-mounts the host's copy over this when it exists; pre-create +# an empty config so that when it doesn't, the CLI no longer logs "configuration +# file not found" (3x) at every agent start (audit D-48). The CLI self-heals it. +RUN echo '{}' > /home/agent/.claude.json + # PYTHONUNBUFFERED: flush stdout/stderr immediately so the SDK driver's logs # (e.g. the intake agent's turn-received / streamed lines) reach `docker logs` in # real time instead of block-buffering until the container is reaped.