Skip to content

SessionStart hook error on Windows: node:internal/modules/cjs/loader:1423 (non-blocking) #1554

Description

@flupkede

Bug

On Windows, the SessionStart hook reports a non-blocking error at every startup:

SessionStart:startup hook error
Failed with non-blocking status code: node:internal/modules/cjs/loader:1423

The error is non-blocking — superpowers skill content IS correctly injected into the session, so the plugin functions normally. The error is purely cosmetic but appears on every session start.

Environment

Details

The hook command configured in hooks/hooks.json:

"command": "\"${CLAUDE_PLUGIN_ROOT}/hooks/run-hook.cmd\" session-start"

The run-hook.cmd polyglot script successfully finds C:\Program Files\Git\bin\bash.exe and runs session-start, which outputs valid JSON (the context IS injected). Despite this, Claude Code's hook runner reports a failure with node:internal/modules/cjs/loader:1423 as the "status code".

node:internal/modules/cjs/loader:1423 is a Node.js internal module path — not a valid integer exit code — suggesting the error originates inside Claude Code's own Node.js hook-spawning code rather than from the bash process itself.

Related

Suggested Investigation

  • Does Claude Code's hook runner on Windows correctly capture the exit code from .cmd files spawned via Node.js child_process?
  • Is the Node.js CJS loader error thrown when Claude Code attempts to resolve/spawn the hook command path on Windows?

Workaround

None available without patching the plugin cache (fragile, overwritten on update).

Metadata

Metadata

Assignees

No one assigned

    Labels

    claude-codeClaude Code (Anthropic CLI) issuesupstream-bugBug in upstream dependency (e.g. Claude Code)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions