Bug
When installed via the Claude Code plugin marketplace, save-session.sh and run-consolidation.sh calculate PROJECT_DIR incorrectly using relative path navigation (dirname "$0")/../../.."), which resolves to the plugin cache directory instead of the actual project root.
Root Cause
Line 57 of save-session.sh and line 37 of run-consolidation.sh:
PROJECT_DIR="$(cd "$(dirname "$0")/../../.." && pwd)"
When installed manually (copied to .claude/remember/scripts/), this resolves correctly:
.claude/remember/scripts/save-session.sh → ../../.. → project root ✓
When installed via marketplace (runs from cache), it resolves to:
~/.claude/plugins/cache/claude-plugins-official/remember/<hash>/scripts/save-session.sh
→ ../../.. → ~/.claude/plugins/cache/claude-plugins-official/ ✗
The hook entry scripts (session-start-hook.sh, post-tool-hook.sh) already use $CLAUDE_PROJECT_DIR correctly, but the background scripts they spawn (save-session.sh, run-consolidation.sh) recalculate from scratch and lose it.
Symptoms
now.md never created
remember.md stays empty
- 92% of autonomous save logs are 0 bytes
- Non-empty logs show:
cd: .../claude-plugins-official/.claude/remember: No such file or directory
Second issue: _parse_response in haiku.py
Claude CLI v2.1.86+ with --output-format json returns a list of message objects, not a single dict with a result key. haiku.py:101 calls data.get("result") which fails with AttributeError: 'list' object has no attribute 'get'.
Suggested Fix
save-session.sh and run-consolidation.sh:
PROJECT_DIR="${CLAUDE_PROJECT_DIR:-$(cd "$(dirname "$0")/../../.." && pwd)}"
PIPELINE_DIR="${CLAUDE_PLUGIN_ROOT:-${PROJECT_DIR}/.claude/remember}"
session-start-hook.sh and post-tool-hook.sh (ensure env propagates to subprocesses):
export CLAUDE_PROJECT_DIR="$PROJECT" CLAUDE_PLUGIN_ROOT="$PLUGIN_ROOT"
haiku.py: Handle list response format from CLI v2.1.86+.
Environment
- Claude Code: 2.1.86
- macOS Darwin 25.3.0
- Plugin installed via
claude-plugins-official marketplace
- Python 3.10+
Bug
When installed via the Claude Code plugin marketplace,
save-session.shandrun-consolidation.shcalculatePROJECT_DIRincorrectly using relative path navigation (dirname "$0")/../../.."), which resolves to the plugin cache directory instead of the actual project root.Root Cause
Line 57 of
save-session.shand line 37 ofrun-consolidation.sh:PROJECT_DIR="$(cd "$(dirname "$0")/../../.." && pwd)"When installed manually (copied to
.claude/remember/scripts/), this resolves correctly:When installed via marketplace (runs from cache), it resolves to:
The hook entry scripts (
session-start-hook.sh,post-tool-hook.sh) already use$CLAUDE_PROJECT_DIRcorrectly, but the background scripts they spawn (save-session.sh,run-consolidation.sh) recalculate from scratch and lose it.Symptoms
now.mdnever createdremember.mdstays emptycd: .../claude-plugins-official/.claude/remember: No such file or directorySecond issue:
_parse_responseinhaiku.pyClaude CLI v2.1.86+ with
--output-format jsonreturns a list of message objects, not a single dict with aresultkey.haiku.py:101callsdata.get("result")which fails withAttributeError: 'list' object has no attribute 'get'.Suggested Fix
save-session.shandrun-consolidation.sh:session-start-hook.shandpost-tool-hook.sh(ensure env propagates to subprocesses):haiku.py: Handle list response format from CLI v2.1.86+.Environment
claude-plugins-officialmarketplace