You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SessionStart hook fails with ParserError on Windows (PowerShell dispatch) #82
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:
Install claude-remember v0.7.2 on Windows via the claude-plugins-official marketplace.
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.
Hey @dajcajerisa95-hue — huge thanks for this report. The reproduction steps, the side-by-side with the PowerShell snippet that does work, the environment block, the note that it's intermittent on the same machine — that level of detail is gold and saved hours of guessing. Genuinely appreciate it. 🙏
Quick status from our side:
We've shipped test: lint hooks.json for cross-shell dispatch safety #83, which adds a lint test suite for hooks/hooks.json to catch this class of bug going forward (quoting of ${CLAUDE_PLUGIN_ROOT}, stray stderr redirects, and ${VAR} patterns that risk PowerShell parse errors). It runs on ubuntu/macos/windows in CI, including a PowerShell Parser::ParseInput check on the windows-latest runner.
That test passes on the current hooks.json — meaning the literal command string is technically valid PowerShell syntax. So we haven't reproduced your ParserError yet, and we don't want to push a "fix" that's really a guess.
To get a real fix in, could you share a bit more diagnostic info?
$PSVersionTable output (in the same pwsh session where Claude Code launches).
Your CLAUDE_PLUGIN_ROOT value at the moment of failure — easiest way: open a Claude Code session, paste echo $env:CLAUDE_PLUGIN_ROOT in a PowerShell window started from the same env, and share the resulting path. We're specifically wondering about: spaces, non-ASCII characters, OneDrive-style paths with ', or trailing/leading whitespace.
A failing-run transcript if you can grab one: Start-Transcript, reproduce the failure, Stop-Transcript, paste the relevant chunk. The exact PowerShell command line Claude Code actually executes is the missing piece.
Claude Code's installed shell, if you know it — was Claude Code installed/launched from pwsh, Windows Terminal, VS Code's integrated terminal, or something else? (Some launchers wrap the command string differently before dispatch.)
Anything you can share narrows the failure mode down. Even partial info helps.
Hello Florian,
I usually use Git Bash as my default terminal, and this is where I get the
error. The same issue does not occur when using Windows PowerShell.
Hope this helps,
Erisa
On Tue, 26 May 2026 at 18:35, Florian DAVID ***@***.***> wrote:
*fdaviddpt* left a comment (Digital-Process-Tools/claude-remember#82)
<#82 (comment)>
Hey @dajcajerisa95-hue <https://github.com/dajcajerisa95-hue> — huge
thanks for this report. The reproduction steps, the side-by-side with the
PowerShell snippet that *does* work, the environment block, the note that
it's intermittent on the same machine — that level of detail is gold and
saved hours of guessing. Genuinely appreciate it. 🙏
Quick status from our side:
- We've shipped #83
<#83>,
which adds a lint test suite for hooks/hooks.json to catch this class
of bug going forward (quoting of ${CLAUDE_PLUGIN_ROOT}, stray stderr
redirects, and ${VAR} patterns that risk PowerShell parse errors). It
runs on ubuntu/macos/windows in CI, including a PowerShell
Parser::ParseInput check on the windows-latest runner.
- That test passes on the current hooks.json — meaning the literal
command string is technically valid PowerShell syntax. So we *haven't
reproduced your ParserError yet*, and we don't want to push a "fix"
that's really a guess.
To get a real fix in, could you share a bit more diagnostic info?
1. *$PSVersionTable* output (in the same pwsh session where Claude
Code launches).
2. *Your CLAUDE_PLUGIN_ROOT value* at the moment of failure — easiest
way: open a Claude Code session, paste echo $env:CLAUDE_PLUGIN_ROOT in
a PowerShell window started from the same env, and share the resulting
path. We're specifically wondering about: spaces, non-ASCII characters,
OneDrive-style paths with ', or trailing/leading whitespace.
3. *A failing-run transcript* if you can grab one: Start-Transcript,
reproduce the failure, Stop-Transcript, paste the relevant chunk. The
exact PowerShell command line Claude Code actually executes is the missing
piece.
4. *Claude Code's installed shell*, if you know it — was Claude Code
installed/launched from pwsh, Windows Terminal, VS Code's integrated
terminal, or something else? (Some launchers wrap the command string
differently before dispatch.)
Anything you can share narrows the failure mode down. Even partial info
helps.
Thanks again for filing this so cleanly.
—
Reply to this email directly, view it on GitHub
<#82?email_source=notifications&email_token=CEU7XLYE7337IPL7ZR2UVLT44XBWNA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINJUGYZDOOJSHEYKM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-4546279290>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/CEU7XL75DQT3C44VJXKINCD44XBWNAVCNFSM6AAAAACZNMLYHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DKNBWGI3TSMRZGA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
Activity
test: skip bash parse test on Windows (WSL launcher noise)
fdaviddpt commentedon May 26, 2026
Hey @dajcajerisa95-hue — huge thanks for this report. The reproduction steps, the side-by-side with the PowerShell snippet that does work, the environment block, the note that it's intermittent on the same machine — that level of detail is gold and saved hours of guessing. Genuinely appreciate it. 🙏
Quick status from our side:
hooks/hooks.jsonto catch this class of bug going forward (quoting of${CLAUDE_PLUGIN_ROOT}, stray stderr redirects, and${VAR}patterns that risk PowerShell parse errors). It runs on ubuntu/macos/windows in CI, including a PowerShellParser::ParseInputcheck on the windows-latest runner.hooks.json— meaning the literal command string is technically valid PowerShell syntax. So we haven't reproduced yourParserErroryet, and we don't want to push a "fix" that's really a guess.To get a real fix in, could you share a bit more diagnostic info?
$PSVersionTableoutput (in the same pwsh session where Claude Code launches).CLAUDE_PLUGIN_ROOTvalue at the moment of failure — easiest way: open a Claude Code session, pasteecho $env:CLAUDE_PLUGIN_ROOTin a PowerShell window started from the same env, and share the resulting path. We're specifically wondering about: spaces, non-ASCII characters, OneDrive-style paths with', or trailing/leading whitespace.Start-Transcript, reproduce the failure,Stop-Transcript, paste the relevant chunk. The exact PowerShell command line Claude Code actually executes is the missing piece.Anything you can share narrows the failure mode down. Even partial info helps.
Thanks again for filing this so cleanly.
test: parse hook command after substituting weird CLAUDE_PLUGIN_ROOT …
test: force utf-8 on subprocess pipes for non-ASCII path cases
test: cover the full zoo of Windows-funky CLAUDE_PLUGIN_ROOT values
dajcajerisa95-hue commentedon May 29, 2026
test: cover Git-Bash launch path for #82
test: execute session-start hook under Git Bash instead of parse-only (…
test: reproduce #82 — run hook with CRLF-converted scripts under Git …
fdaviddpt commentedon May 29, 2026
Thanks Erisa — Git Bash is the key detail. Could you grab three things, all from the Git Bash window where the error happens?
1. The exact command Claude Code dispatches (this is the missing piece). Launch with debug logging, reproduce the SessionStart error, then quit:
Paste the lines containing
SessionStart/hookfromclaude-debug.log.2. The plugin path value:
3. Versions:
That debug log shows the literal command string Claude Code hands to PowerShell — once we see it, we can reproduce and fix. 🙏
test: lint hooks.json for cross-shell dispatch safety (#83)