[BUG] auto-memory resolver still walks up to ancestor-encoded project (re-filing #53734 / #52772, unfixed)
Re-filing of #53734 (closed as dup of #52772, which was also auto-closed for inactivity). Bug is still present on Claude Code 2.1.220.
Summary
The auto-memory resolver walks up to an ancestor-encoded project directory instead of the cwd-encoded path. In a nested project structure, sessions launched from a subdirectory resolve their memory bucket to the parent's path-encoded directory, not the subdirectory's.
Environment
- Claude Code 2.1.220 (VSCode extension, Windows 11)
- Nested project structure:
C:\Projects\ParentRepo\departments\{alpha,beta,gamma,...}— each subdirectory is its own project with its own.claude/andCLAUDE.md
Reproduction (still active as of 2026-08-15)
The resolver creates path-encoded project directories for both the parent and nested paths:
~/.claude/projects/c--Projects-ParentRepo/ (ancestor)
~/.claude/projects/c--Projects-ParentRepo-departments-alpha/ (correct for alpha)
~/.claude/projects/c--Projects-ParentRepo-departments-beta/ (correct for beta)
When a session launches from C:\Projects\ParentRepo\departments\alpha\, the harness resolves the memory bucket to c--Projects-ParentRepo/memory/ (the ancestor) instead of c--Projects-ParentRepo-departments-alpha/memory/ (the correct cwd-encoded path).
This means:
- Memory writes land in the wrong bucket (ancestor instead of project-specific)
- Memory reads pull from the wrong bucket (cross-contamination between unrelated projects)
- The CLAUDE.md resolver may also walk up, applying parent instructions instead of project-specific ones
Workaround
We verify the memory bucket title at every session start and halt on mismatch. This has caught the walk-up consistently across 50+ sessions over 4 months. The workaround works but imposes a per-session tax on every project in the tree.
Previous issues
- #53734 — our original filing, auto-closed as duplicate of #52772
- #52772 — the parent issue, also auto-closed for inactivity (2026-05-28)
Neither was fixed. The auto-close messages say "please file a new issue if this is still relevant." It is.
Expected behavior
The memory bucket should resolve deterministically to the cwd-encoded path, never walk up to an ancestor. If intentional walk-up is desired, it should be opt-in.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗