Repository navigation
feat(devcontainer): default Claude to max effort and keep more state - #55
Merged
Merged
Conversation
Every Claude Code session starts at max effort: CLAUDE_CODE_EFFORT_LEVEL
in containerEnv, since the settings file's effortLevel has no "max".
A rebuild now keeps shell and REPL history and the download caches, on
musher-${devcontainerId}-shell-history and -cache (DEVC-08), beside the
gh, Claude and Codex logins it already kept.
gh logs in by itself and git's github.com credential points at it, from
the canonical lib/github-auth.sh that every repository copies verbatim.
post-create only seeds a token (base_setup_github_seed); the git wiring
runs in a new post-attach hook, because VS Code copies the host's
~/.gitconfig only after post-create and only when none exists, so
writing one earlier costs the developer their name and email.
lib/npm-registry.sh ships beside it for repositories that install
@musher-dev/* from GitHub Packages; the template itself does not use it.
Docs: what a rebuild keeps and how to reset a volume (on the host:
inside, docker reaches Docker-in-Docker's daemon); the effort default;
the git config copy, which is VS Code's and happens after post-create;
and that stack data does survive a rebuild, in the docker-in-docker
Feature's own volumes. Commented examples for a node_modules volume,
Codespaces repository access and hostRequirements, and the Claude Code
extension.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codespaces settings are out of scope for this baseline, so the commented hostRequirements and customizations.codespaces examples go. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The awk line prints each volume's mount root, .../volumes/<name>/_data, not a bare name; say so, so the reset steps read right. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Docker refuses to remove a volume that any container still uses, even a stopped one, so the steps remove the container first. Listing the mounts with docker inspect on the host gives the names directly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 21, 2026
Merged
Open
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 #56.
Summary
containerEnvsetsCLAUDE_CODE_EFFORT_LEVEL=max, because the settings file'seffortLevelaccepts onlylowtoxhighand quietly dropsmax. The variable outranks/effortfor the session, so start a lighter one asCLAUDE_CODE_EFFORT_LEVEL=auto claude.musher-${devcontainerId}-shell-history, wired into zsh and bash bybase_setup_shell_history) and the download caches (musher-${devcontainerId}-cacheat~/.cache) join the gh, Claude and Codex logins on per-container volumes (DEVC-08).lib/github-auth.sh:github_auth_seed, which stores a token from the host's exportedGH_TOKEN(MUSHER_HOST_GH_TOKEN) and writes no git config.post-attach.shcallsensure_github_auth. If gh still has no token, it asks VS Code's forwarded credential helper. Then it clears the helper lines the host's.gitconfigbrought for the host's own gh, and runsgh auth setup-git.~/.gitconfigonly after post-create, and only when none exists (.gitconfig not copied to remote container microsoft/vscode-remote-release#6810). Its forwarded helper arrives at the same moment. Agh auth setup-gitin post-create, as the copies in platform, platform-api, host-agent and host-images run today, creates the file first, and the developer's name and email never arrive.lib/npm-registry.shships beside it, for repositories that install@musher-dev/*from GitHub Packages. The template itself doesn't use it.npm_registry_setupnever prompts and skips a token withoutread:packages.npm_registry_authbacks a repo'stask setup:registry.${GITHUB_TOKEN}reference, so the token never goes stale.docs/configuration.md, README):dockerreaches Docker-in-Docker's daemon./var/lib/dockerand/var/lib/containerdon volumes of its own.dind-datamount said otherwise; it is replaced by that explanation and a commentednode_modulesexample.This is the pilot of one dev-container baseline across every musher-dev repository that has a dev container, one PR each. The two scripts in
lib/are the canonical copies those PRs copy verbatim. First consumer: musher-dev/platform-backstage#114, CI green; it also ran a rebuild that kept its volumes and an end-to-end test with the real gh.Test plan
task lint(markdownlint, yamllint, actionlint, codespell).repo check: layout, paths, env, ports, hooks, comments (CMT-01/03)..repotests: 45 passed.conventions check --fail-on warningat the pinned 0.8.0: no findings.shellcheck -x --source-path=SCRIPTDIRover every.devcontainerscript: clean.devcontainer read-configuration: the merged mounts include the Feature'sdind-var-lib-docker-${devcontainerId}anddind-var-lib-containerd-${devcontainerId}.HOME:~/.gitconfig.user.name/user.emailand VS Code's own helper.read:packagesskips the registry, andnpm_registry_authasks for the scope.~/.npmrcis written0600, with no temp file left behind.devcontainer upin docker-in-docker (no credentials passed in):CLAUDE_CODE_EFFORT_LEVEL=max.~/.local, is owned byvscode.HISTFILE.~/.gitconfigafter create and attach.verify-toolchain.sh(CI'srunCmd) passed.🤖 Generated with Claude Code