Commit c26dd46
fix: dir-mount a dedicated Claude config dir for the CLI backend
The CLI backend mounted the host's `~/.claude/.credentials.json` as a
single file. The Claude CLI refreshes its short-lived OAuth token via
atomic rename (new inode), but a single-file bind mount is pinned to the
inode resolved at container start — so the container keeps reading the
stale, expired token and fails with "authentication expired" until the
stack is restarted.
Switch to mounting a dedicated config *directory* (`~/clayde-claude`),
which resolves the path live and picks up refreshes with no restart. The
README previously claimed host refreshes were "immediately reflected" —
they were not; this corrects the docs and the compose mount.
Using a dedicated login (separate `CLAUDE_CONFIG_DIR`) also isolates the
container from the host's personal `~/.claude` state and gives it its own
OAuth refresh-token lineage, so container refreshes can't invalidate the
host login (refresh tokens are single-use).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 0083cff commit c26dd46
3 files changed
Lines changed: 28 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
207 | | - | |
| 207 | + | |
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
| 134 | + | |
| 135 | + | |
135 | 136 | | |
136 | | - | |
| 137 | + | |
137 | 138 | | |
138 | 139 | | |
139 | 140 | | |
140 | 141 | | |
141 | 142 | | |
142 | 143 | | |
143 | 144 | | |
144 | | - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
145 | 160 | | |
146 | 161 | | |
147 | 162 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
39 | 46 | | |
40 | 47 | | |
41 | 48 | | |
| |||
0 commit comments