Repository navigation
Description
Summary
On a healthy install where capture is working, /remember:doctor reports:
-- Paths --
FAIL Path resolution failed: FATAL: Cannot resolve project root. CLAUDE_PROJECT_DIR is not set and plugin is not in a local .claude/remember/ layout (PIPELINE_DIR=/Users/…/plugins/cache/claude-plugins-official/remember/0.8.9).
VERDICT: problem — paths did not resolve, capture cannot run (see above)
commands/doctor.md instructs the model to relay this verbatim and to not second-guess the verdict, so the user is told capture cannot run when in fact it is running normally. In my case memory files, the capture-alive marker and a recent last-save.json were all present and correct.
Reproduction
- Install the plugin from the marketplace (so
PIPELINE_DIRis the versioned cache path, not a local.claude/remember/layout). - Let a session run long enough for PostToolUse to save at least once.
- Run
/remember:doctor.
Running the same script with the variable set produces the correct report:
$ CLAUDE_PROJECT_DIR=/path/to/project bash scripts/doctor.sh
…
VERDICT: capture is working — last save 2026-07-27 18:13:59
Cause
commands/doctor.md runs bash "${CLAUDE_PLUGIN_ROOT}/scripts/doctor.sh" through the Bash tool. Claude Code exports CLAUDE_PROJECT_DIR to hooks, but it is not present in the Bash tool's process environment — confirmed by echo "[$CLAUDE_PROJECT_DIR]", which prints empty there.
resolve-paths.sh then hits its third branch and fatals rather than guess. That refusal is correct for the hooks — a wrong guess writes memory into the wrong project — but doctor.sh is a read-only report, and its own ENVIRONMENT header already documents a default that is never implemented:
# CLAUDE_PROJECT_DIR Project root (default: .)
PIPELINE_DIR is unaffected: resolve-paths.sh falls back to walking up from the script's own location, and that fallback works (the failing message prints the correct PIPELINE_DIR). Only CLAUDE_PROJECT_DIR needs the default.
This is the same class of failure the doctor was built to end (#144, #200): a silent no-op that sends the user off to fix something that is not broken. Here the report itself is the false signal.
Suggested fix
One line in doctor.sh, before resolve-paths.sh is sourced — scoped to the diagnostic so resolve-paths.sh keeps its strict no-guessing behaviour for the hooks:
# ── 2. Resolved paths ───────────────────────────────────────────────────────
echo "-- Paths --"
# Claude Code exports CLAUDE_PROJECT_DIR to its *hooks*, not to a plain shell —
# and the /remember:doctor slash command runs this through the Bash tool, where
# it is unset. resolve-paths.sh then fatals rather than guess, which is correct
# for the hooks (a wrong guess writes memory into the wrong project) but turns
# this read-only report into a false FAIL on a healthy install. Default to cwd,
# which is what this file's own ENVIRONMENT header already documents.
: "${CLAUDE_PROJECT_DIR:=$PWD}"
export CLAUDE_PROJECT_DIR
_RESOLVE_ERR_FILE="${TMPDIR:-/tmp}/remember-doctor-resolve-$$"Worst case for a diagnostic run from an unrelated directory is a report about the directory the user is standing in, which is what default: . promises.
Verified locally against 0.8.9: with this applied, a bare bash scripts/doctor.sh reports VERDICT: capture is working and the full path/tool/storage/capture sections render correctly.
Happy to open a PR if useful.
Environment
- Plugin version 0.8.9 (marketplace install,
claude-plugins-official) - macOS (Darwin 25.5.0), bash
- Python 3.14.6, jq 1.8.2
- Storage mode: legacy (in-project
.remember/)
Activity
fix(doctor): stop false FAIL on marketplace installs missing CLAUDE_P…