[Bug] Marketplace commands trigger SessionStart hooks during installation

Resolved 💬 3 comments Opened Mar 10, 2026 by VIVIVAVAOfficial Closed Mar 13, 2026

Bug Description
Title: claude marketplace commands should not trigger SessionStart hooks

Description:

When running claude marketplace add <plugin>, SessionStart hooks are triggered, causing installed
plugins (e.g., bkit-starter) to activate their startup flows — greeting messages, interactive
questions, etc.

This is problematic because:

  1. marketplace add/remove/list are utility commands that should only install, remove, or list plugins

and exit immediately.

  1. Plugin SessionStart hooks interfere with the installation process, making it appear broken or

confusing to the user.

  1. There is currently no way to bypass this (--no-hooks flag does not exist).

Expected behavior:

  • claude marketplace add/remove/list should run without triggering any hooks (SessionStart,

UserPromptSubmit, etc.)

  • Hooks should only activate during normal interactive sessions (claude or claude -p)

Workaround (current):

  • Temporarily set "disableAllHooks": true in settings.json before running marketplace commands, then

revert — which is not a reasonable UX.

Suggested fix:

  • Skip all hook execution when the CLI is invoked with marketplace subcommands.

Real-world context:

This issue was encountered while using https://github.com/anthropics/claude-code/issues — a Claude Code
plugin ecosystem installed via claude marketplace add. bkit registers SessionStart hooks to provide
guided onboarding flows. When running claude marketplace add phuryn/pm-skills to install an additional
skill package, the bkit-starter plugin's SessionStart hook fired, displaying interactive greeting
prompts and blocking the installation flow.

This confirms that any plugin with SessionStart hooks will interfere with marketplace commands, making
it a general issue — not specific to bkit.

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 2.1.71
  • Feedback ID: fb123dd1-aecf-469a-901f-2133f30608c3

Errors

[{"error":"Error\n    at _p (/$bunfs/root/src/entrypoints/cli.js:82:1144)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:83:10015)\n    at emit (node:events:92:22)\n    at endReadableNT (internal:streams/readable:861:50)\n    at processTicksAndRejections (native:7:39)\n    at request (/$bunfs/root/src/entrypoints/cli.js:85:2149)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-03-10T02:55:10.363Z"},{"error":"Error\n    at _p (/$bunfs/root/src/entrypoints/cli.js:82:1144)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:83:10015)\n    at emit (node:events:92:22)\n    at endReadableNT (internal:streams/readable:861:50)\n    at processTicksAndRejections (native:7:39)\n    at request (/$bunfs/root/src/entrypoints/cli.js:85:2149)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-03-10T02:56:07.562Z"}]

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗