Skip to content

Give Claude a config dir that dies with the container - #44

Merged
CrypticSwarm merged 1 commit into
masterfrom
restore-claude-user-setting-source
Aug 20, 2026
Merged

Give Claude a config dir that dies with the container#44
CrypticSwarm merged 1 commit into
masterfrom
restore-claude-user-setting-source

Conversation

@CrypticSwarm

@CrypticSwarm CrypticSwarm commented Aug 20, 2026

Copy link
Copy Markdown
Owner

Restoring user to --setting-sources fixes 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_DIR now 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.

--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.
@CrypticSwarm
CrypticSwarm merged commit cc4fb14 into master Aug 20, 2026
4 checks passed
@CrypticSwarm
CrypticSwarm deleted the restore-claude-user-setting-source branch August 20, 2026 04:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant