Skip to content

SessionStart hook fails — CLAUDE_PLUGIN_ROOT not set by Claude Code for this event #256

@AKhozya

Description

@AKhozya

Description

The SessionStart hook in hooks.json (line 74) fails because Claude Code doesn't set the CLAUDE_PLUGIN_ROOT environment variable for SessionStart events (it only sets it for PreToolUse, PostToolUse, etc.).

"command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/hooks/session-start.js\""

This resolves to node "/scripts/hooks/session-start.js" → MODULE_NOT_FOUND → exit code 1.

Root Cause

This is a Claude Code plugin system bug — filed upstream at anthropics/claude-code#27145. But ECC could work around it by resolving the path differently for SessionStart hooks.

Workaround

Manually replace ${CLAUDE_PLUGIN_ROOT} with the absolute cache path in hooks.json. Needs reapplying after plugin updates.

Environment

  • ECC v1.5.0
  • Claude Code CLI, macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcodexFlagged for Codex pickup

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions