claude-code - 💡(How to fix) Fix Claude Code ignored MEMORY.md warning and edited wrong repo for entire session [2 comments, 2 participants]

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…
GitHub stats
anthropics/claude-code#46283Fetched 2026-04-11 06:24:24
View on GitHub
Comments
2
Participants
2
Timeline
7
Reactions
0
Timeline (top)
labeled ×5commented ×2

Error Message

Error Messages/Logs

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Body template: Session ID: 206e912d-ab6f-437a-8473-0c8d835bde83 Date: 2026-04-10 Model: claude-opus-4-6 Working directory (cwd): E:\Go_Daisy\wotnow Correct repo for task: E:\Go_Daisy\findr

Summary: Claude Code spent ~2 hours attempting to fix a CSS z-index bug on http://localhost:3000/findr/log by editing files in E:\Go_Daisy\wotnow, despite MEMORY.md containing a note that wotnow and findr are separate repos. The dev server was running from E:\Go_Daisy\findr the entire time, so none of the edits took effect. I repeatedly said "same issue" and "restarted server same issue" and Claude continued editing the wrong repo instead of verifying the path.

This is apparently a recurring issue across sessions — Claude's cwd defaults to wotnow at session start and it consistently edits there instead of checking which repo the user's dev server is running from.

Impact:

  • ~2 hours wasted
  • Significant token spend on edits, re-reads, and Sonnet QA subagent calls, all against the wrong files
  • Requesting token credit for the session

What Should Happen?

Clause should use its memory file to point itself to the correct repo.

Error Messages/Logs

Steps to Reproduce

If you have multiple repos in your IDE, tell claude which repo to use and to store that in memory files. Next session attempt to change a file and check which repo claude is using.

Claude Model

Opus

Is this a regression?

No, this never worked

Last Working Version

No response

Claude Code Version

2.1.38 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

No response

extent analysis

TL;DR

Claude Code should be configured to use the correct repository based on the user's dev server location, stored in its memory file.

Guidance

  • Verify that the MEMORY.md file contains the correct repository information and that Claude Code is configured to read from it.
  • Check the Claude Code settings to ensure that it is set to use the repository specified by the dev server location, rather than defaulting to a specific repository like wotnow.
  • Test the configuration by running a new session and checking which repository Claude Code is using.
  • Consider adding a step to the pre-session setup to confirm the correct repository with the user.

Example

No code snippet is provided as the issue does not imply a specific code change.

Notes

The issue seems to be related to the configuration of Claude Code and its interaction with the user's dev server. The provided information suggests that the problem is not with the code itself, but rather with how the tool is being used.

Recommendation

Apply a workaround by manually configuring Claude Code to use the correct repository for each session, until a more permanent fix can be implemented. This will help prevent further token spend and reduce the time wasted on incorrect edits.

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