Skip to content

SessionStart hook fails with ParserError on Windows (PowerShell dispatch) #82

@dajcajerisa95-hue

Description

@dajcajerisa95-hue

Description

On Windows, the SessionStart hook in hooks/hooks.json fails with ParserError before bash is invoked. The hook is non-blocking, so Claude Code still starts, but the === REMEMBER === / === MEMORY === block isn't injected into the session — defeating the plugin's core function on affected launches.

The failure is intermittent: same machine, same plugin version, sometimes succeeds, sometimes fails. When it fails, the status line shows:

SessionStart:startup hook error
Failed with non-blocking status code: ParserError:

Reproduction

Steps to reproduce:

  1. Install claude-remember v0.7.2 on Windows via the claude-plugins-official marketplace.
  2. Open Claude Code in any project directory.
  3. Observe the SessionStart status line on la

The hook command in hooks/hooks.json that f

bash "${CLAUDE_PLUGIN_ROOT}/scripts/session-start-hook.sh"

The script itself works correctly when invokevars from PowerShell:

$env:CLAUDE_PROJECT_DIR = (Get-Location).Path
& bash "$env:CLAUDE_PLUGIN_ROOT/scripts/session-start-hook.sh"
# → emits === REMEMBER === ... correctly, exi

So the failure is in how Claude Code dispatches the hook on Windows, not in the script. PowerShell's parser interacts
badly with the ${CLAUDE_PLUGIN_ROOT} substi.json command string.

Expected behavior

Hook runs on every SessionStart, prints memorode injects it into the session context.

Actual behavior

SessionStart:startup hook error / Failed witarserError: shown in the status line. Nomemory content reaches the session context. Behavior is intermittent across launches on the same setup.

Environment

  • claude-remember version: 0.7.2
  • Claude Code version: 2.1.150
  • Shell: PowerShell 7+ (pwsh)
  • OS: Windows 11 Enterprise (10.0.26200)
  • Python version: 3.12.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions