[BUG] Marketplace plugins with JS/TS deps: autoUpdate never runs package install
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When a marketplace plugin has JavaScript/TypeScript dependencies (package.json with a lockfile), Claude Code's autoUpdate mechanism does a git pull but never runs a package manager install. Since node_modules/ is always gitignored, dependencies go missing after the initial clone and after every update.
This causes every hook defined by the plugin to fail with errors like:
Cannot find package 'which' from '.../aide/src/core/aide-client.ts'
For a plugin like aide which defines 17 hooks across 9 lifecycle events, this produces 3-7 hook error messages per tool call (4x PreToolUse + 3x PostToolUse).
Steps to Reproduce
- Install a marketplace plugin that has npm/bun dependencies (e.g. aide)
- Enable
autoUpdate: truein settings - Start a new session
- Observe all plugin hooks failing with missing package errors
Expected Behavior
After cloning or updating a marketplace plugin, Claude Code should detect the presence of a lockfile (bun.lock, package-lock.json, yarn.lock) and run the appropriate install command (bun install --frozen-lockfile, npm ci, etc.).
Alternatively, support an explicit installCommand field in plugin.json so plugin authors can declare a post-install step.
Workaround
A SessionStart hook that scans ~/.claude/plugins/marketplaces/*/ for lockfiles and runs the appropriate package manager when node_modules/ is missing.
Environment
- macOS arm64 (Darwin 25.4.0)
- Affected plugin: aide v0.0.54 (17 hooks, all failing)
- Bun v1.3.11
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗