feat: add pnpm feature; persist Claude config in agents (agents v1.2.0)#3
Merged
Conversation
- New `pnpm` feature: corepack enable + `corepack install` (pins pnpm from packageManager at postCreate) with an optional `removeNpm` to enforce pnpm. - agents v1.2.0: mount a persistent ~/.claude volume + set CLAUDE_CONFIG_DIR and chown it, mirroring the gh-login persistence. Together these let a consumer repo drop its post-create.sh / post-start.sh and the .claude mount entirely. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
arv
commented
Jun 11, 2026
| "options": { | ||
| "removeNpm": { | ||
| "type": "boolean", | ||
| "default": false, |
| set -euo pipefail | ||
|
|
||
| # Option (booleans arrive as the strings "true"/"false"). | ||
| REMOVE_NPM="${REMOVENPM:-false}" |
Addresses PR review: enforce pnpm-only by default. Updates the option default, the install.sh fallback, the test, and README usage. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0xcadams
reviewed
Jun 11, 2026
| fi | ||
|
|
||
| echo "Enabling Corepack..." | ||
| corepack enable |
Member
There was a problem hiding this comment.
I think this causes .pnpm-store/ folder to be created in the repo dir?
Here's how we fixed in cloudzero repo: https://github.com/rocicorp/cloudzero/blob/5c10238ad6cd2368b70c35e345d0803482ee0e13/.devcontainer/post-create.sh#L4-L10
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.
Goal
Make the dev container setup DRY — push the shared toolchain/persistence logic into features so consumer repos need no
post-create.sh/post-start.shat all.Changes
New
pnpmfeature (v1.0.0)corepack enableat build;corepack installat postCreate (pins pnpm from the workspacepackageManager).removeNpmoption removesnpm/npxto enforce pnpm. Deferred to postCreate so it runs after build-time global npm installs (e.g. theagentsCodex install), avoiding the ordering trap of removing npm before other features use it.agentsv1.2.0 — persist Claude configdevcontainer-claude-configvolume at~/.claude, setsCLAUDE_CONFIG_DIR, andchowns it — mirroring the gh-login persistence from v1.1.0.Consumer payoff
A repo's
devcontainer.jsoncollapses to image + gitconfig mount + two feature lines + oxc — no lifecycle scripts, no.claudemount, noCLAUDE_CONFIG_DIR, no chown:Notes
noderemote user (our standard base image).🤖 Generated with Claude Code