Description
Summary
init-plugins.sh provisions Claude Code plugins with claude plugin install
only, and claude plugin install is a no-op once a plugin is present. Because
devcontainer.json mounts /home/node/.claude as a named volume, the
plugin cache survives every rebuild — so the install loop finds every plugin
already there and silently does nothing, forever.
The net effect: plugin versions freeze at whatever was latest on the day the
volume was first created, and "Dev Containers: Rebuild Container" never
updates them. Nothing in postCreateCommand, postStartCommand or
updateContentCommand ever calls claude plugin update or
claude plugin marketplace update.
This is easy to miss because the script's header comment — "Idempotent — safe
to run multiple times" — is true, and is precisely the reason the drift is
invisible. It is also not cosmetic: a stale plugin ships a stale skill. In our
container the bundled modern-web-guidance skill was 19 releases behind and
actively told the agent its guidance was out of date mid-task.
Reproduction
- Create a container from the
claude-codetemplate;postCreateCommandruns
init-plugins.shand installs the plugin list at their then-latest versions. - Leave the container in use for a few weeks (or just wait for upstream plugin
releases). - Run "Dev Containers: Rebuild Container" —
postCreateCommandre-runs. - Observe every plugin is still at its original version. The
/home/node/.claude
volume was never recreated, so the cache was never empty.
$ claude plugin install "modern-web-guidance@googlechrome"
Installing plugin "modern-web-guidance@googlechrome"...✔ Plugin
"modern-web-guidance@googlechrome" is already installed (scope: user)
$ ls ~/.claude/plugins/cache/googlechrome/modern-web-guidance/
0.0.170/
…while the upstream package was at 0.0.189. The stale copy pins a skill
version that its own CLI rejects:
PROBLEM DETECTED: The modern-web-guidance skill is very out-of-date. It requires
an update to ensure top-quality performance.
Your version: 2026_05_16-c5e7870
Latest version: 2026_09_04-7de96777
Verification
The install-is-a-no-op claim and the fix were both confirmed in a running
container:
# 1. install does not refresh an already-installed plugin
claude plugin install "modern-web-guidance@googlechrome"
# -> "is already installed (scope: user)"; cache stays at 0.0.170
# 2. update does, but only after the marketplace index is refreshed
claude plugin marketplace update
# -> "Successfully updated 3 marketplace(s)"
claude plugin update "modern-web-guidance@googlechrome"
# -> "updated from 0.0.170 to 0.0.189 for scope user. Restart to apply changes."
# 3. the refreshed plugin carries the current skill
grep -o "skill-version [0-9_a-z-]*" \
~/.claude/plugins/cache/googlechrome/modern-web-guidance/0.0.189/skills/modern-web-guidance/SKILL.md
# -> skill-version 2026_09_04-7de96777Note that step 2 needs both commands: claude plugin update alone resolves
against the cached marketplace index, so a stale index makes it a no-op too.
Suggested fix
Follow the install loop in init-plugins.sh with a refresh pass. claude plugin update is safe on an already-current plugin, so this stays idempotent:
for plugin in "${PLUGINS[@]}"; do
if claude plugin install "$plugin" 2>&1; then
echo "✔ Installed: $plugin"
else
echo "⚠ Failed to install: $plugin" >&2
fi
done
+# Plugins live in the persistent /home/node/.claude volume, so `install` above is
+# a no-op on every run after the first. Without this, plugin versions freeze at
+# whatever was latest when the volume was created — rebuilds included.
+# The marketplace index must be refreshed first, or `update` resolves against a
+# stale index and reports no update available.
+claude plugin marketplace update 2>&1 || echo "⚠ Marketplace refresh failed" >&2
+
+for plugin in "${PLUGINS[@]}"; do
+ claude plugin update "$plugin" 2>&1 || echo "⚠ Update check failed: $plugin" >&2
+doneTwo alternatives, if a postCreateCommand-time refresh is considered too slow:
- Move the refresh pass into
postStartCommand, beside
/usr/local/bin/patch-playwright-mcp, so plugins refresh on every container
start rather than only on create. - Leave the loop as-is and document the gap in the template README, so consumers
knowclaude plugin updateis theirs to run. This is the weakest option — the
whole point ofinit-plugins.shis that provisioning is not manual.
Worth noting for whichever option is chosen: claude plugin update prints
"Restart to apply changes", so a refresh during postCreateCommand applies
cleanly on the first interactive session, whereas one in postStartCommand
applies to the next start.
Affected files in this repo
claude-code/.devcontainer/init-plugins.sh:62— theclaude plugin install
loop, with noupdatecounterpart anywhere in the script.claude-code/.devcontainer/devcontainer.json:105— the
…-claude-config-…:/home/node/.claudenamed volume that makes the cache
outlive the container.claude-code/.devcontainer/devcontainer.json:124—postStartCommandruns
onlypatch-playwright-mcp; no plugin refresh on start either.
Related
- [BUG] patch-playwright-mcp misses mid-session plugin cache updates #98 (
patch-playwright-mcpmisses mid-session plugin cache updates) — a
different symptom of the same cache being treated as write-once. - Add Modern Web Guidance plugin to claude-code images + document baked-in plugins #102 (Add Modern Web Guidance plugin to claude-code images) — added the plugin
whose staleness surfaced this. - docs: READMEs still describe rtk/ralphex/claude-code/agent-browser as unpinned "latest" #119 (READMEs still describe tooling as unpinned "latest") — same theme: the
template promises "latest" where the mechanism does not deliver it.
Activity