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
Silent no-op when the plugin is enabled mid-session: PostToolUse never registers, no error surfaced #200
Thanks for the plugin — the pipeline itself works well. Reporting a failure mode that is silent, which made it hard to notice: memory simply never gets written, with no error anywhere.
What happened
On Windows (Git Bash), the plugin was installed and enabled mid-session in a long-running Claude Code session. Result: ~/.remember/<slug>/logs/ contained a single session-start line and nothing else. No memory files were produced for that project over many hours and hundreds of tool calls. logs/hook-errors.log was empty, so nothing indicated a problem.
Root cause
PostToolUse (which drives save-session.sh) was never registered, because Claude Code loads hook definitions at session start and the plugin was enabled after that session began. The plugin was working exactly as designed — it simply was not wired in yet.
Invoking the hook manually confirmed the pipeline is healthy end to end:
So the fix is just "restart Claude Code" — but there is no way for a user to discover that.
Suggestions
Make the gap detectable. The SessionStart hook already runs; it could check whether a PostToolUse registration is visible (or simply whether any save has ever occurred for this project) and print a one-line notice such as "remember: PostToolUse not active in this session — restart Claude Code to enable capture." One line at session start would have saved a full day of silent no-ops.
Say it in the README install steps. "Restart Claude Code after enabling, otherwise capture will not run until the next session" — currently a user reasonably assumes enabling is sufficient.
Optional: a doctor-style command reporting resolved paths, detected tools, whether hooks are active, and the timestamp of the last successful save. That single output would make this class of problem self-diagnosing.
Happy to test a fix on Windows/Git Bash if useful. Environment: Windows 11, Git Bash (MSYS), Python 3.14, Node 25, remember 0.8.3 via claude-plugins-official, external storage mode (data_dir: ~/.remember/{slug}) with git backup enabled.
Thank you — this is an unusually good report. You did the diagnosis yourself, including the manual hook invocation that proved the pipeline was healthy end to end, which is the part that would otherwise have taken us the longest.
#201 implements suggestions 2 and 3, and as much of 1 as turns out to be possible.
On suggestion 1 — it can't be done live, and it's worth saying why. I checked before building: there is no way for a hook to see which hooks are registered (no env var, no file, no CLI — /hooks is a read-only UI a script can't invoke), and SessionStart's source field is only startup|resume|clear|compact|fork, so a plugin-enable is indistinguishable from a fresh start. So the gap genuinely cannot be detected while it is happening.
What it can do is report it afterwards, using exactly the signature your logs showed: a session where SessionStart ran and PostToolUse never did. PostToolUse now records the session id it saw, and the next SessionStart compares it against the previous session's. If that session used tools at all, you get a one-line notice at your next prompt. It's delivered through systemMessage — the only hook output the human actually sees, rather than one that only reaches the model, which is how this stayed invisible in the first place.
That doesn't rescue the lost session, but it means nobody spends a second day wondering.
Suggestion 3 became /remember:doctor and is the piece I think you'll get the most out of: resolved paths, detected tools, storage mode, whether the session directory Claude Code actually created matches the slug the plugin computes (a separate silent no-op, #144), last successful save, and whether PostToolUse has ever fired. OK/WARN/FAIL per line and a one-line verdict.
Suggestion 2 is now in the install steps.
Two bugs turned up while testing the doctor, both worth mentioning because they're the same species as the one you reported: it initially told existing installs "PostToolUse has never fired" while printing a successful save two lines later, and it printed an empty slug as OK while silently skipping the check that slug feeds. Both fixed — the second now says it could not check, which is not the same as "no problem."
On your offer to test on Windows/Git Bash — yes please, if you still have the appetite. We have no Windows machine here. Everything is written for bash 3.2 and MSYS and the suite passes on our runners, but /remember:doctor on a real MSYS terminal, and the notice actually appearing after a mid-session enable, are two things only you can confirm. The branch is max/detect-silent-noop-and-doctor.
One thing we haven't resolved: /reload-plugins exists, but the docs don't say whether it re-registers hooks. If it does, the answer is a reload rather than a full restart. If you happen to try it, that's useful to know.
Update: this is merged to main (e58f3a6), so the branch I pointed you at is gone — sorry about that. Testing target is main, and it goes out in 0.8.9 (#203).
Review turned up two things worth knowing before you try it, both of which would have hit you specifically:
The doctor would have misdiagnosed you. Its PostToolUse has never fired marker was written after the hook's no-transcript early exit — so on a slug mismatch, or with a Python it can't find, the marker was never written and the verdict came out as "restart Claude Code", which fixes neither. Since you're on Windows/Git Bash with Python 3.14, the Python path was a realistic route for you. It now distinguishes "the hook is wired" from "the hook serviced a session", and names the specific cause before the generic one.
The notice could have eaten your prompt. It's delivered as systemMessage, which is built with jq — and jq was the last command in the script, so its exit status became the hook's. jq exits 2 on a usage error, and on UserPromptSubmit exit 2 blocks the prompt and erases what you typed. That would have fired on every prompt with a notice pending. Now the JSON is built first and only printed if it was produced, with the hook always exiting 0.
Also, one thing I got wrong first time: the check was gated on having run before, which meant it could only ever have caught a recurrence — not the mid-session enable that happened to you, since no hook runs then and no stamp is written. That gate is gone. A fresh install now sees the notice once per project, worded to cover both readings.
If you do get a chance to try it, the three useful signals are: /remember:doctor output on a real MSYS terminal, whether the notice appears at your next prompt after a mid-session enable, and whether the verdict line matches reality. Any of the three is useful on its own.
Known limits, so they're not a surprise: the alive marker is per project rather than per session, so two Claude Code windows on the same project can produce a spurious notice; and a notice is consumed by the next prompt in any session, so a session closed before its first prompt hands it to the following one.
Still open, and genuinely useful if you happen to test it: whether /reload-plugins re-registers hooks. If it does, the answer to all of this is a reload rather than a full restart, and the README should say so.
Activity
fdaviddpt commentedon Jul 27, 2026
Thank you — this is an unusually good report. You did the diagnosis yourself, including the manual hook invocation that proved the pipeline was healthy end to end, which is the part that would otherwise have taken us the longest.
#201 implements suggestions 2 and 3, and as much of 1 as turns out to be possible.
On suggestion 1 — it can't be done live, and it's worth saying why. I checked before building: there is no way for a hook to see which hooks are registered (no env var, no file, no CLI —
/hooksis a read-only UI a script can't invoke), andSessionStart'ssourcefield is onlystartup|resume|clear|compact|fork, so a plugin-enable is indistinguishable from a fresh start. So the gap genuinely cannot be detected while it is happening.What it can do is report it afterwards, using exactly the signature your logs showed: a session where
SessionStartran andPostToolUsenever did.PostToolUsenow records the session id it saw, and the nextSessionStartcompares it against the previous session's. If that session used tools at all, you get a one-line notice at your next prompt. It's delivered throughsystemMessage— the only hook output the human actually sees, rather than one that only reaches the model, which is how this stayed invisible in the first place.That doesn't rescue the lost session, but it means nobody spends a second day wondering.
Suggestion 3 became
/remember:doctorand is the piece I think you'll get the most out of: resolved paths, detected tools, storage mode, whether the session directory Claude Code actually created matches the slug the plugin computes (a separate silent no-op, #144), last successful save, and whetherPostToolUsehas ever fired.OK/WARN/FAILper line and a one-line verdict.Suggestion 2 is now in the install steps.
Two bugs turned up while testing the doctor, both worth mentioning because they're the same species as the one you reported: it initially told existing installs "PostToolUse has never fired" while printing a successful save two lines later, and it printed an empty slug as
OKwhile silently skipping the check that slug feeds. Both fixed — the second now says it could not check, which is not the same as "no problem."On your offer to test on Windows/Git Bash — yes please, if you still have the appetite. We have no Windows machine here. Everything is written for bash 3.2 and MSYS and the suite passes on our runners, but
/remember:doctoron a real MSYS terminal, and the notice actually appearing after a mid-session enable, are two things only you can confirm. The branch ismax/detect-silent-noop-and-doctor.One thing we haven't resolved:
/reload-pluginsexists, but the docs don't say whether it re-registers hooks. If it does, the answer is a reload rather than a full restart. If you happen to try it, that's useful to know.feat: name the silent no-op, and a doctor to ask about it (#200) (#201)
fdaviddpt commentedon Jul 27, 2026
Update: this is merged to
main(e58f3a6), so the branch I pointed you at is gone — sorry about that. Testing target ismain, and it goes out in 0.8.9 (#203).Review turned up two things worth knowing before you try it, both of which would have hit you specifically:
The doctor would have misdiagnosed you. Its
PostToolUse has never firedmarker was written after the hook's no-transcript early exit — so on a slug mismatch, or with a Python it can't find, the marker was never written and the verdict came out as "restart Claude Code", which fixes neither. Since you're on Windows/Git Bash with Python 3.14, the Python path was a realistic route for you. It now distinguishes "the hook is wired" from "the hook serviced a session", and names the specific cause before the generic one.The notice could have eaten your prompt. It's delivered as
systemMessage, which is built withjq— andjqwas the last command in the script, so its exit status became the hook's.jqexits 2 on a usage error, and onUserPromptSubmitexit 2 blocks the prompt and erases what you typed. That would have fired on every prompt with a notice pending. Now the JSON is built first and only printed if it was produced, with the hook always exiting 0.Also, one thing I got wrong first time: the check was gated on having run before, which meant it could only ever have caught a recurrence — not the mid-session enable that happened to you, since no hook runs then and no stamp is written. That gate is gone. A fresh install now sees the notice once per project, worded to cover both readings.
If you do get a chance to try it, the three useful signals are:
/remember:doctoroutput on a real MSYS terminal, whether the notice appears at your next prompt after a mid-session enable, and whether the verdict line matches reality. Any of the three is useful on its own.Known limits, so they're not a surprise: the alive marker is per project rather than per session, so two Claude Code windows on the same project can produce a spurious notice; and a notice is consumed by the next prompt in any session, so a session closed before its first prompt hands it to the following one.
Still open, and genuinely useful if you happen to test it: whether
/reload-pluginsre-registers hooks. If it does, the answer to all of this is a reload rather than a full restart, and the README should say so.fix(capture-gap): store capture evidence per session, not in one slot (…
perf(hooks): post-tool-hook 30 → 17 spawns per tool call (#230)
perf(hooks): post-tool-hook 30 → 17 spawns per tool call (#230) (#233)
fix(git-backup): a rejected push is not a deferred push (#256)
perf(post-tool): give PostToolUse the #227 env-cache fast path (#352)
fix(#823): log the exclusion-cap give-up and malformed timeout values…
Fix #1046/#1047/#1052 review round 2: 32KiB stdin cap, chat-only resc…
Fix final-review findings on #1046, #1047, #1052
Fix #1046, #1047, #1052: cross-store recovery, quadratic stdin extrac…