Memory files become unopenable in file-preview pane after session's working directory changes

Status Open
Maintainer reply None cached
Activity 0 comments · opened Sep 16, 2026

Description

The auto-memory system's file-preview links become permanently unopenable within a session once that session's working directory changes away from the directory the session originally started in.

Steps to reproduce

  1. Start a Claude Code session in project directory A. The memory system is initialized at ~/.claude/projects/<hash-of-A>/memory/.
  2. Mid-session, change the working directory to project B (e.g. via cd or the app's directory switcher).
  3. Ask Claude to reference or open a memory file (e.g. via the MEMORY.md index links).
  4. Click the memory file link in the file-preview pane.

Expected

The file opens in the preview pane, since the absolute path is valid and the file exists.

Actual

The preview pane shows "Couldn't find this file — It may have been deleted, or it lives outside the working directory," and prints the correct absolute path to the file (which does exist on disk). The pane appears to restrict previews to the current working directory's tree, but the memory system itself remains pinned to the original directory's ~/.claude/projects/<hash>/memory/ for the lifetime of the session — so this becomes permanently unreachable via the UI for that session once the working directory diverges, even though memory is documented as persisting "across conversations."

Impact

Any long-running session that changes its working directory loses the ability to preview its own memory files in-app (Finder/external open still works).

View original on GitHub ↗