[BUG] Plugin initialization failures reported as "hook error"

Resolved 💬 3 comments Opened Mar 12, 2026 by NavNab Closed Mar 16, 2026

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 plugins in enabledPlugins or extraKnownMarketplaces fail to initialize, Claude Code reports them as generic "SessionStart:startup hook error" / "SessionStart:resume hook error" — identical to user-defined hook failures. No plugin name or source is included.

What Should Happen?

Plugin failures should produce a distinct error like Plugin load error: "plugin-name" failed to initialize, separate from hook errors.

Error Messages/Logs

SessionStart:startup hook error (×2 on start), SessionStart:resume hook error (×1 on exit)

Steps to Reproduce

  1. Add a stale/broken plugin to enabledPlugins in ~/.claude/settings.json (e.g. "semgrep", "serena")
  2. Start a new Claude Code session
  3. Observe "SessionStart:startup hook error" messages
  4. All user-defined hooks exit 0 (verified via diagnostic logging)
  5. Remove the plugin entries → errors disappear

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.74

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

VS Code integrated terminal

Additional Information

Reproduced on both macOS and Linux. Diagnostic hook-guard logging proved all user hooks exit 0 — the errors come exclusively from plugin initialization. Affected plugins: semgrep, al-language-server-go-linux, serena, greptile, stripe.

View original on GitHub ↗

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