claude-code - 💡(How to fix) Fix Plan-mode and auto-memory file paths inconsistent across sessions — agent writes to wrong dir when two adjacent .claude-* config dirs exist

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

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.

Root Cause

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.

Fix Action

Fix / Workaround

Workarounds tried

RAW_BUFFERClick to expand / collapse

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/):

  1. Start a session in a project that has auto-memory configured. System prompt opens with /Users/<user>/.claude-fortiumpartners/projects/.../memory/...
  2. Enter plan mode. EnterPlanMode system reminder gives a plan path under .claude-fortiumpartners/plans/<slug>.md
  3. 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
  4. User reviews the plan at the path the harness UI shows (the .claude-fortiumpartners one) → sees stale content from a previous plan
  5. 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.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING