Repository navigation
chore(repo): default Claude to max effort and keep more state - #120
Open
amiralis1365 wants to merge 1 commit into
Open
amiralis1365 wants to merge 1 commit into
amiralis1365 wants to merge 1 commit into
Conversation
Claude Code defaults to max effort only through CLAUDE_CODE_EFFORT_LEVEL: the settings file's effortLevel has no "max". CLAUDE_CONFIG_DIR keeps .claude.json inside the claude-config volume, so a rebuild no longer loses the account, onboarding and trust state. Shell history and ~/.cache get volumes of their own, so a rebuild keeps zsh, bash, Node and Python history and the uv, npm and mise caches. post-create now stores a token in gh, from the host's exported GH_TOKEN, and a new post-attach hook wires git to it. VS Code copies the host's ~/.gitconfig only after post-create, and only when none exists, so nothing may write git config before then. lib/github-auth.sh is a verbatim copy of the canonical script in musher-dev/development-container. Codex gets a mise pin, aqua:openai/codex 0.163.0, for the codex-config volume the container already had. mise 2026.9.12 cannot lock 0.143.0: it resolves an aqua codex tag only among the 100 newest releases. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Closes #119.
Summary
CLAUDE_CODE_EFFORT_LEVEL=maxincontainerEnv, since the settings file'seffortLevelhas nomax. To use another level for one session:CLAUDE_CODE_EFFORT_LEVEL=auto claude..claude.jsonsurvives a rebuild.CLAUDE_CONFIG_DIR=/home/vscode/.claudekeeps the account, onboarding and trust state beside the sessions, in theclaude-configvolume. Without it the file landed in~/and was lost on every rebuild.musher-${devcontainerId}-shell-history: zsh, bash, Node and Python history (NODE_REPL_HISTORY, andPYTHON_HISTORY, which the pinned Python 3.13 reads).-cache:~/.cache, wherecontainerEnvalready points uv, npm and Python's bytecode, and where mise keeps its cache..devcontainer/scripts/lib/github-auth.sh):GH_TOKENyour host exports (remoteEnv.MUSHER_HOST_GH_TOKEN).post-attach.shseeds gh from VS Code's forwarded credential when it still has none, then points git'sgithub.comcredential at the container's gh. It does this only after VS Code has copied your~/.gitconfig: the copy happens only after post-create, and only when no~/.gitconfigexists, so wiring git earlier would cost you your name and email..config/mise/config.tomlasaqua:openai/codex0.163.0, for thecodex-configvolume the container already had, and locked for all seven platforms (the lockfile diff is Codex only). No gate runs it, and every CI job installs a named subset of the file, so CI downloads it (150 to 160 MB, by platform) only inside the dev container. The toolchain table indocs/repository.mdnow lists it.mise install --lockedthen refuses it. The pin's comment says to bump only to a current release.github-auth.shis a verbatim copy of the canonical script in musher-dev/development-container#55; musher-dev/platform-backstage#114 was its first consumer. Typechore: repository machinery, so no release is cut and consumers see no change.What a rebuild keeps
musher-${devcontainerId}-…)gh-config~/.config/ghghloginclaude-config~/.claude/resume), and now.claude.jsoncodex-config~/.codexshell-history(new)~/.shell-historycache(new)~/.cachevenvengineering-conventions/.venvNot kept: the pinned CLIs under
~/.local/share/miseand Claude Code under~/.local, which post-create installs again.Before and after your first rebuild
.claude.jsonused to live outside the volume, so Claude Code may run its first-run steps once more after this rebuild. It keeps them from then on.repoandread:orgscopes, as some credential managers' tokens do, rungh auth loginonce. Thegh-configvolume keeps it.codex loginonce; thecodex-configvolume keeps it.AI usage
Test plan
devcontainer read-configuration(CLI 0.89.0): parses. The merged mounts are the six volumes (gh, Claude, Codex, shell history, cache, venv), and the merged configuration carriespostAttachCommand,CLAUDE_CODE_EFFORT_LEVEL=max,CLAUDE_CONFIG_DIR, the two history paths andMUSHER_HOST_GH_TOKEN.shellcheck -x --source-path=SCRIPTDIRover all six.devcontainerscripts: clean, with no inline suppression.lib/github-auth.shis byte-identical to the canonical copy (cmp).PROMPT_COMMAND./home/vscodeand/home/vscode/.config, both owned byvscode, so no mount makes Docker create a root-owned parent.mise install --lockedrefuses it. 0.163.0 locks all seven, andmise install --lockedinstallscodex-cli 0.163.0. A latermise lockthat cannot resolve a release leaves its entry unchanged.task lint: clean, as onmain.task conventions:self: no findings, warnings included, through both the CLI and the launcher, as onmain.task check(every gate CI runs except the dev container build): passes.task tools:doctor: every pin is installed, Codex included.Validate / Requiredincluded. TheValidate / Dev Containerjob covers the build and the lifecycle: it builds with--frozen-lockfile, runsdevcontainer up(post-create and post-attach), thenverify-toolchain.sh, which fails unless Codex installed from the lock. Its log shows the ownership step for the shell-history and cache directories, both history lines, 24 of 24 tools installed from the lock with Codex 0.163.0 among them, post-attach running, and the verification passing. It passes the job's token andCI=true, so gh takes its env-token path and the Claude Code install is skipped./resumelists earlier sessions, history survives.Not exercised for this repository, by CI or locally: the no-credential path and its "no GitHub credential reached the container yet" line, the ownership of the new mounts at runtime, and the absence of
~/.gitconfigafter create. The template's fresh-volume run in musher-dev/development-container#55 checked all three, with the samesetup_config_dirsownership step and the samegithub-auth.sh.🤖 Generated with Claude Code