Plan-mode and auto-memory file paths inconsistent across sessions — agent writes to wrong dir when two adjacent .claude-* config dirs exist
Summary
Plan-mode and auto-memory file paths surfaced by Claude Code's system reminders are sometimes wrong / inconsistent across the same session, causing the agent to write to a path that doesn't match what the user sees. Has happened repeatedly across sessions.
Repro
On a Mac with two adjacent Claude config directories present (e.g., a legacy ~/.claude-fortiumsoftware/ and a current ~/.claude-fortiumpartners/):
- Start a session in a project that has auto-memory configured. System prompt opens with
/Users/<user>/.claude-fortiumpartners/projects/.../memory/... - Enter plan mode.
EnterPlanModesystem reminder gives a plan path under.claude-fortiumpartners/plans/<slug>.md - Inside that plan mode, the agent's environment hints + cwd / tool descriptions reference paths under
.claude-fortiumsoftware/...(the legacy dir) — so the agent writes the plan to.claude-fortiumsoftware/plans/<slug>.md - User reviews the plan at the path the harness UI shows (the
.claude-fortiumpartnersone) → sees stale content from a previous plan - User flags the mismatch, agent re-writes to the correct path — round-trip wasted
Same shape for auto-memory files: agent saves memory under .claude-fortiumsoftware/projects/.../memory/ while the auto-memory loader reads from .claude-fortiumpartners/projects/.../memory/. Memory written today doesn't survive into tomorrow's session because it's at the wrong path.
Expected
- Plan-mode system reminders state the canonical plan path AND the agent writes to that exact path
- Auto-memory writes should also use the canonical path stated in the system prompt
- If two adjacent config directories exist, the harness should disambiguate (or prefer one consistently) and never expose the other to the agent's tool-call paths
Actual
- Plan-mode reminder says
.claude-fortiumpartners/plans/<slug>.md - Agent's CWD/env hints / tool description boilerplate reference
.claude-fortiumsoftware/...paths from a legacy install - Agent writes to whichever path it sees most recently — frequently the wrong one
- User reviews via UI which reads from the canonical path → sees stale content
Impact
Reported by user "this happens too often" on 2026-05-15. Specifically:
- Stale plans displayed at review time → round-trip to re-write → lost minutes per occurrence
- Auto-memory not persisting across sessions → repeated feedback / preferences need to be re-learned each session
Environment
- macOS Darwin 25.4.0
- Two legacy Claude config dirs present:
/Users/<user>/.claude-fortiumsoftware/(older — what tool descriptions seem to reference)/Users/<user>/.claude-fortiumpartners/(newer — what the harness UI + system prompt reference)
Suggested fix
- Either: consolidate to a single config directory and migrate legacy paths
- Or: have the system prompt explicitly enumerate the canonical paths to use for plans + memory at session start, with a clear "do not substitute" line, AND echo those paths in EVERY plan-mode and memory-write related system reminder
Either way, the path used by the harness UI and the path the agent writes to MUST match.
Workarounds tried
User flags the mismatch when it occurs; agent saves a memory rule to "always use the EXACT path from the EnterPlanMode system reminder". This catches it in-session but doesn't help with auto-memory writes that go to the wrong location silently.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗