Skip to content

fix(claude-code): update plugins on every init-plugins.sh run - #166

Merged
gatezh merged 2 commits into
masterfrom
fix/init-plugins-refresh
Sep 23, 2026
Merged

gatezh merged 2 commits into
masterfrom
fix/init-plugins-refresh

Conversation

@gatezh

@gatezh gatezh commented Sep 23, 2026

Copy link
Copy Markdown
Owner

What

After its install loop, init-plugins.sh now refreshes the marketplace indexes and runs claude plugin update for each bundled plugin. The change applies to both the claude-code template copy and the repo-root copy.

Why

~/.claude is a named volume that survives rebuilds, and claude plugin install is a no-op for a plugin that's already installed. As a result, plugin versions froze at whatever was latest when the volume was created, and Rebuild Container never updated them. #158 caught modern-web-guidance 19 releases behind, with its own CLI complaining that it was out of date.

Changes

  • claude-code/.devcontainer/init-plugins.sh:
    • claude plugin marketplace update, with no name, which refreshes all marketplaces, followed by claude plugin update "$plugin" for each plugin.
    • Each step uses the script's existing ✔/⚠ output and can't abort the script under set -euo pipefail.
  • .devcontainer/init-plugins.sh: the same pass, in that script's Note: output style.
  • claude-code/README.md:
    • The init-plugins section now mentions the update pass.
    • Adjacent fix in the same section: "four marketplaces" is now five, and the missing cloudflare/skills / cloudflare row is added to the bundled-plugins table.

Notes

  • CLI contract is confirmed from both code.claude.com/docs (plugins-reference) and --help in claude-code:latest (2.1.278):
  • Verification (in claude-code:latest):
    • Two back-to-back runs both exit 0; the second reports every plugin "already at the latest version".
    • plugin update nope@nowhere exits 1, which is caught by the ⚠ branch.
    • With --network none, each update prints ⚠ and the script keeps going.
    • shellcheck and actionlint are clean.
  • Not verified: a real old-to-new upgrade, because a stale install couldn't be faked locally. That path rests on [BUG] init-plugins.sh never updates plugins — install no-ops against the persistent ~/.claude volume #158's evidence from a real container (0.0.170 → 0.0.189).
  • Pre-existing and out of scope: with no Playwright plugin cache (e.g. offline), /usr/local/bin/patch-playwright-mcp exits non-zero and aborts the claude-code init-plugins.sh under set -e. The unmodified script behaves the same way. Worth a separate issue.
  • Merge order: fix(claude-code): fix template lifecycle wiring and persist gh config #165 also edits the init-plugins.sh header and the README's init-plugins section. Whichever merges second needs a small rebase.

Fixes #158

~/.claude is a named volume that survives rebuilds, so after the first
run `claude plugin install` finds every plugin already present and
no-ops. Plugin versions froze at whatever was latest when the volume was
created, and "Rebuild Container" never updated them.

After the install loop, refresh all marketplace indexes
(`claude plugin marketplace update`, no name = all) and then run
`claude plugin update <name@marketplace>` per plugin. The index refresh
must come first: `plugin update` resolves against the cached catalog.
Both steps are non-fatal under `set -e`, matching the existing
per-item success/warning output. Applied to the repo-root
.devcontainer/init-plugins.sh too, which had the same install-only loop.

README: describe the update step, and fix the adjacent bundled-plugins
table (five marketplaces, add the missing cloudflare row).

Fixes #158
…fresh

# Conflicts:
#	claude-code/.devcontainer/init-plugins.sh
@gatezh
gatezh merged commit 9faaa08 into master Sep 23, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] init-plugins.sh never updates plugins — install no-ops against the persistent ~/.claude volume

1 participant