Symptom
On the first session in any project (or after deleting .remember/), every hook fires this non-blocking failure:
PostToolUse:Read hook error
Failed with non-blocking status code: /bin/sh:
/path/to/project/.remember/logs/hook-errors.log: No such file or directory
Triggers for SessionStart and PostToolUse on every tool call. Subsequent sessions in the same project work fine — but only because the first session eventually creates .remember/logs/ (via scripts/log.sh:38) for a later call, not the one whose stderr is being redirected right now.
Root cause
hooks/hooks.json defines:
{
"type": "command",
"command": "bash \"${CLAUDE_PLUGIN_ROOT}/scripts/session-start-hook.sh\" 2>> \"${CLAUDE_PROJECT_DIR:-.}/.remember/logs/hook-errors.log\""
}
The shell opens the stderr file descriptor for hook-errors.log before the script body runs — so the mkdir -p inside scripts/log.sh:38 cannot help: the redirect is evaluated by the parent shell, and it fails when the directory doesn't exist yet.
Reproduce
rm -rf <project>/.remember/
# open a Claude Code session in <project>
# every hook reports: "No such file or directory"
Fix
Prepend mkdir -p to each command in hooks/hooks.json so the redirect target always exists. Idempotent and cheap:
{
"type": "command",
"command": "mkdir -p \"${CLAUDE_PROJECT_DIR:-.}/.remember/logs\" && bash \"${CLAUDE_PLUGIN_ROOT}/scripts/session-start-hook.sh\" 2>> \"${CLAUDE_PROJECT_DIR:-.}/.remember/logs/hook-errors.log\""
}
Same change for the PostToolUse entry.
Version
remember 0.5.0 (via claude-plugins-official marketplace cache)
Workaround for users
Until a release ships, manually mkdir -p <project>/.remember/logs before the first session, or patch the cached hooks.json locally (will be overwritten on plugin update).
Symptom
On the first session in any project (or after deleting
.remember/), every hook fires this non-blocking failure:Triggers for
SessionStartandPostToolUseon every tool call. Subsequent sessions in the same project work fine — but only because the first session eventually creates.remember/logs/(viascripts/log.sh:38) for a later call, not the one whose stderr is being redirected right now.Root cause
hooks/hooks.jsondefines:{ "type": "command", "command": "bash \"${CLAUDE_PLUGIN_ROOT}/scripts/session-start-hook.sh\" 2>> \"${CLAUDE_PROJECT_DIR:-.}/.remember/logs/hook-errors.log\"" }The shell opens the stderr file descriptor for
hook-errors.logbefore the script body runs — so themkdir -pinsidescripts/log.sh:38cannot help: the redirect is evaluated by the parent shell, and it fails when the directory doesn't exist yet.Reproduce
Fix
Prepend
mkdir -pto each command inhooks/hooks.jsonso the redirect target always exists. Idempotent and cheap:{ "type": "command", "command": "mkdir -p \"${CLAUDE_PROJECT_DIR:-.}/.remember/logs\" && bash \"${CLAUDE_PLUGIN_ROOT}/scripts/session-start-hook.sh\" 2>> \"${CLAUDE_PROJECT_DIR:-.}/.remember/logs/hook-errors.log\"" }Same change for the
PostToolUseentry.Version
remember 0.5.0(viaclaude-plugins-officialmarketplace cache)Workaround for users
Until a release ships, manually
mkdir -p <project>/.remember/logsbefore the first session, or patch the cachedhooks.jsonlocally (will be overwritten on plugin update).