You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: validate completions output before writing; document two-mount requirement (#8)
Closes#7
## Bug 1 — Fish (and bash/zsh) completions corrupted at build time
`claude completions <shell>` runs at image build time when Claude Code
is unauthenticated. The CLI exits 0 but writes an error message to
stdout (e.g. `Not logged in · Please run /login`). The previous direct
redirect saved that error verbatim into the completions file, causing
fish to print parse errors on every shell start.
**Fix:** capture output into a variable and validate the prefix before
writing:
| Shell | Valid prefix |
|-------|-------------|
| fish | `complete` |
| bash | `_` or `#` |
| zsh | `#compdef` |
Invalid or empty output is skipped with a warning; no file is written.
## Bug 2 — Onboarding re-triggers when only `~/.claude` is mounted
Claude Code stores preferences and onboarding state in `~/.claude.json`
— a sibling of `~/.claude/`, not inside it. The previous README guidance
mounted only the directory, so `~/.claude.json` was never persisted and
the onboarding wizard re-ran on every container start.
**Fix:** update `README.md`, `src/claude-code/README.md`, and the
`mountHostConfig` logged snippet to document that two mounts are
required and warn that `~/.claude.json` must exist on the host before
the container starts (Docker creates it as a directory if absent).
## Test plan
- [ ] CI passes (ShellCheck, shfmt, all scenario tests)
- [ ] Build a container with fish installed — confirm no parse errors on
shell start
- [ ] Build with `mountHostConfig: true` — confirm logged snippet shows
both mounts
0 commit comments