Commit ce50168
fix(engine): write skills/sub-agents to ${HOME}/.claude regardless of CLAUDE_CONFIG_DIR
setup-claude.sh writes per-pod settings.json, MCP config, custom
skills, and sub-agents into either ${CLAUDE_CONFIG_DIR}/ (when set
for session persistence) or ${HOME}/.claude/ (when not). Claude Code
respects CLAUDE_CONFIG_DIR for the first two, but its slash-command
skill and sub-agent discovery is hardcoded to read from the
HOME-relative paths ${HOME}/.claude/skills/ and
${HOME}/.claude/agents/, irrespective of CLAUDE_CONFIG_DIR. The
result on session-persistence-enabled deployments: skills were
correctly delivered into the pod's PVC mount but invisible to the
agent — invocations failed with "Unknown skill: <name>".
The fix moves both directories under ${HOME}/.claude/ unconditionally.
Skills and sub-agents are deterministically regenerated from the
CLAUDE_SKILL_* and CLAUDE_SUBAGENT_PATH_* env vars at every pod start
— the env vars are set by the controller per Job, so a restart
rebuilds them identically. They don't benefit from PVC persistence
the way the session JSONLs do, so the previous co-location of all
config under ${CLAUDE_DIR} was incidental rather than intentional.
settings.json, the MCP config, and CLAUDE_CONFIG_DIR's export are
unchanged — those genuinely live under whichever directory the
operator pointed at, and Claude Code reads them from there.
Behaviour change: skill/sub-agent files no longer take PVC space on
deployments that enable session persistence. Operators who relied on
in-place edits surviving pod restarts (an unintended emergent
property of the previous layout) will see those edits regenerated
from env vars. Anyone authoring skills should be doing so via the
controller's config (inline or ConfigMap-backed) rather than editing
the file inside the running pod, so this is closer to the documented
contract.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent b741e67 commit ce50168
2 files changed
Lines changed: 37 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
31 | 45 | | |
32 | 46 | | |
33 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
54 | 63 | | |
55 | 64 | | |
56 | 65 | | |
57 | | - | |
| 66 | + | |
| 67 | + | |
58 | 68 | | |
59 | 69 | | |
60 | 70 | | |
61 | 71 | | |
62 | | - | |
| 72 | + | |
63 | 73 | | |
64 | 74 | | |
65 | 75 | | |
66 | 76 | | |
67 | 77 | | |
68 | 78 | | |
69 | | - | |
| 79 | + | |
70 | 80 | | |
71 | 81 | | |
72 | 82 | | |
73 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
74 | 89 | | |
75 | 90 | | |
76 | | - | |
| 91 | + | |
| 92 | + | |
77 | 93 | | |
78 | 94 | | |
79 | 95 | | |
80 | | - | |
| 96 | + | |
81 | 97 | | |
82 | 98 | | |
83 | 99 | | |
| |||
0 commit comments