Give Claude a config dir that dies with the container - #44
Merged
Conversation
--setting-sources gates more than settings files. With `user` dropped, claude stopped discovering ~/.claude/skills, commands/, and agents/ -- the destinations the asset pipeline populates -- so no skill, slash command, or subagent reached a session. Naming every source again brings back what that flag was hiding: the shared home is claude's config dir, and claude reads CLAUDE.md, rules/, workflows/ (which it compiles and runs), output-styles/, and routines/ out of it -- all writable from inside a session, all visible to the next container and to concurrent ones. Point CLAUDE_CONFIG_DIR at a container-local path instead, and link back the state that has to outlive the run by name. Everything else is rebuilt each run or absent, so a directory claude learns to load in a later release is inert here until someone lists it. plugins/ links read-only: the marketplace clones are worth keeping across runs, but a session must not rewrite what the next container executes.
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.
Restoring
userto--setting-sourcesfixes skill, command, and agent discovery — that scope is where the asset pipeline installs. But user scope also makes the shared home a config dir Claude loads settings, memory, and workflows from, all writable from inside a session and visible to the next container and to concurrent ones.So
CLAUDE_CONFIG_DIRnow points at a container-local path, rebuilt from the config layers and asset pipeline each run. State that must outlive the run (projects/,history.jsonl,.credentials.json,.claude.json, …) is symlinked back into the shared home via an allowlist, so anything Claude learns to load in a later release stays inert until listed.plugins/is kept but mounted read-only: a session must not rewrite what the next container executes.In-session settings edits (
/config,/model, permission acceptances) now die with the container; durable settings belong in a config layer.