Environment:
- Claude Code with plugin system
- Plugin installed at:
~/.claude/plugins/cache/claude-plugins-official/remember/0.1.0/
- Plugin version: 0.1.0
Problem:
When installed via the Claude Code plugin system (not manually copied into the project), save-session.sh and run-consolidation.sh resolve PROJECT_DIR to the wrong directory.
Both scripts compute the project root via path traversal from the script's own location:
PROJECT_DIR="$(cd "$(dirname "$0")/../../.." && pwd)"
This works when the plugin is copied into .claude/remember/scripts/ inside the project. But when installed in the plugin cache, the script path is:
~/.claude/plugins/cache/claude-plugins-official/remember/0.1.0/scripts/save-session.sh
Going up 3 levels resolves to:
~/.claude/plugins/cache/claude-plugins-official/ ← wrong
Instead of the actual project root.
Symptom:
Every save-session.sh invocation immediately fails:
cd: /Users/<user>/.claude/plugins/cache/claude-plugins-official/.claude/remember: No such file or directory
Sessions are never saved. The .remember/ data directory is never populated.
Note: session-start-hook.sh works correctly because it already uses CLAUDE_PROJECT_DIR:
PROJECT="${CLAUDE_PROJECT_DIR:-.}"
save-session.sh and run-consolidation.sh should use the same pattern.
Suggested fix:
Replace line 57 of save-session.sh and line 37 of run-consolidation.sh:
# Before:
PROJECT_DIR="$(cd "$(dirname "$0")/../../.." && pwd)"
# After:
PROJECT_DIR="${CLAUDE_PROJECT_DIR:-.}"
Environment:
~/.claude/plugins/cache/claude-plugins-official/remember/0.1.0/Problem:
When installed via the Claude Code plugin system (not manually copied into the project),
save-session.shandrun-consolidation.shresolvePROJECT_DIRto the wrong directory.Both scripts compute the project root via path traversal from the script's own location:
PROJECT_DIR="$(cd "$(dirname "$0")/../../.." && pwd)"This works when the plugin is copied into
.claude/remember/scripts/inside the project. But when installed in the plugin cache, the script path is:Going up 3 levels resolves to:
Instead of the actual project root.
Symptom:
Every
save-session.shinvocation immediately fails:Sessions are never saved. The
.remember/data directory is never populated.Note:
session-start-hook.shworks correctly because it already usesCLAUDE_PROJECT_DIR:PROJECT="${CLAUDE_PROJECT_DIR:-.}"save-session.shandrun-consolidation.shshould use the same pattern.Suggested fix:
Replace line 57 of
save-session.shand line 37 ofrun-consolidation.sh: