Repository navigation
compose: persist the clayde container's top-level Claude config - #109
Merged
Merged
Conversation
CLAUDE_CONFIG_DIR was never set on the running container, so the CLI's top-level config file (project trust state among it) defaulted to $HOME/.claude.json, a path outside the ~/clayde-claude mount. Every container restart wiped it, surfacing as "Claude configuration file not found" on the next job and silently dropped settings.local.json permissions afterward, since headless runs can't re-accept the trust dialog. Set CLAUDE_CONFIG_DIR=/home/clayde/.claude to match the mount and the one-time host login, as the README already describes it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
claydeservice mounts~/clayde-claudeto/home/clayde/.claude, but never setsCLAUDE_CONFIG_DIR, so the CLI's top-level config file (.claude.json, which holds per-project trust state) defaults to$HOME/.claude.json— a path outside that mount, living only in the container's ephemeral layer.Claude configuration file not found at: /home/clayde/.claude.json, and once the CLI regenerates a fresh default, it no longer hashasTrustDialogAcceptedfor/home/clayde/knowledge_base— sosettings.local.json'spermissions.allowentries get silently ignored (no human available to re-accept the trust dialog in a headless run).CLAUDE_CONFIG_DIR=/home/clayde/.claudeon theclaydeservice, matching the mount and the one-time host login (CLAUDE_CONFIG_DIR=~/clayde-claude claude login) the README already documents. This makes the top-level config file live inside the already-persisted directory mount instead of defaulting to an unmounted path.freeshard-expert-testing-rigorscheduled one-off task — it failed outright (job14cff920), and being a one-off, it's already marked done and won't retry.Test plan
docker compose up -dto deploy, confirm the container starts cleandocker compose restart clayde) and confirm the next job does not hit "Claude configuration file not found"settings.local.jsonpermissions are honored (no "workspace has not been trusted" warning) on the run after restart