claude-code - 💡(How to fix) Fix [Bug] Project autoMemoryDirectory setting ignored, defaults to global memory path instead [1 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#46701Fetched 2026-04-12 13:35:19
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Timeline (top)
labeled ×3commented ×1

Error Message

[{"error":"Error: NON-FATAL: Lock acquisition failed for /home/vscode/.local/share/claude/versions/2.1.101 (expected in multi-process scenarios)\n at qQ$ (/$bunfs/root/src/entrypoints/cli.js:2838:2153)\n at Ee8 (/$bunfs/root/src/entrypoints/cli.js:2838:1233)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-11T15:55:19.274Z"},{"error":"Error: Error normalizing tool input: ZodError: [\n {\n "expected": "string",\n "code": "invalid_type",\n "path": [\n "old_string"\n ],\n "message": "Invalid input: expected string, received undefined"\n },\n {\n "expected": "string",\n "code": "invalid_type",\n "path": [\n "new_string"\n ],\n "message": "Invalid input: expected string, received undefined"\n },\n {\n "code": "unrecognized_keys",\n "keys": [\n "old_str",\n "new_str"\n ],\n "path": [],\n "message": "Unrecognized keys: \"old_str\", \"new_str\""\n }\n]\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:4772:1005)\n at map (native:1:11)\n at E_$ (/$bunfs/root/src/entrypoints/cli.js:4772:556)\n at cm7 (/$bunfs/root/src/entrypoints/cli.js:7925:7500)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-11T16:13:11.878Z"}]

Code Example

[{"error":"Error: NON-FATAL: Lock acquisition failed for /home/vscode/.local/share/claude/versions/2.1.101 (expected in multi-process scenarios)\n    at qQ$ (/$bunfs/root/src/entrypoints/cli.js:2838:2153)\n    at Ee8 (/$bunfs/root/src/entrypoints/cli.js:2838:1233)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-11T15:55:19.274Z"},{"error":"Error: Error normalizing tool input: ZodError: [\n  {\n    \"expected\": \"string\",\n    \"code\": \"invalid_type\",\n    \"path\": [\n      \"old_string\"\n    ],\n    \"message\": \"Invalid input: expected string, received undefined\"\n  },\n  {\n    \"expected\": \"string\",\n    \"code\": \"invalid_type\",\n    \"path\": [\n      \"new_string\"\n    ],\n    \"message\": \"Invalid input: expected string, received undefined\"\n  },\n  {\n    \"code\": \"unrecognized_keys\",\n    \"keys\": [\n      \"old_str\",\n      \"new_str\"\n    ],\n    \"path\": [],\n    \"message\": \"Unrecognized keys: \\\"old_str\\\", \\\"new_str\\\"\"\n  }\n]\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:4772:1005)\n    at map (native:1:11)\n    at E_$ (/$bunfs/root/src/entrypoints/cli.js:4772:556)\n    at cm7 (/$bunfs/root/src/entrypoints/cli.js:7925:7500)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-11T16:13:11.878Z"}]
RAW_BUFFERClick to expand / collapse

Bug Description

  • /workspace/.ai/memory/ — what settings.json configures. Only has MEMORY.md (162 bytes, basically empty) and project_followup_plans.md (git-tracked, modified).
  • /home/vscode/.claude/projects/-workspace/memory/ — the path hardcoded in my system prompt. Has 18 files including all the accumulated feedback and the entry I just wrote.

My system prompt loaded MEMORY.md from the second path at session start, which is why I've been writing there. The project's autoMemoryDirectory setting isn't being honored by whatever injects my memory instructions — the global default wins.

Net effect: ~17 memories (months of accumulated feedback) live in the user-global path, not the git-tracked project path. The one memory that is in .ai/memory/ (project_followup_plans.md) appears to be an earlier manually-placed file, and there's a duplicate of it at the global path too.

Environment Info

  • Platform: linux
  • Terminal: vscode
  • Version: 2.1.101
  • Feedback ID: f03a81a7-5d95-4085-9719-698a250385ca

Errors

[{"error":"Error: NON-FATAL: Lock acquisition failed for /home/vscode/.local/share/claude/versions/2.1.101 (expected in multi-process scenarios)\n    at qQ$ (/$bunfs/root/src/entrypoints/cli.js:2838:2153)\n    at Ee8 (/$bunfs/root/src/entrypoints/cli.js:2838:1233)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-11T15:55:19.274Z"},{"error":"Error: Error normalizing tool input: ZodError: [\n  {\n    \"expected\": \"string\",\n    \"code\": \"invalid_type\",\n    \"path\": [\n      \"old_string\"\n    ],\n    \"message\": \"Invalid input: expected string, received undefined\"\n  },\n  {\n    \"expected\": \"string\",\n    \"code\": \"invalid_type\",\n    \"path\": [\n      \"new_string\"\n    ],\n    \"message\": \"Invalid input: expected string, received undefined\"\n  },\n  {\n    \"code\": \"unrecognized_keys\",\n    \"keys\": [\n      \"old_str\",\n      \"new_str\"\n    ],\n    \"path\": [],\n    \"message\": \"Unrecognized keys: \\\"old_str\\\", \\\"new_str\\\"\"\n  }\n]\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:4772:1005)\n    at map (native:1:11)\n    at E_$ (/$bunfs/root/src/entrypoints/cli.js:4772:556)\n    at cm7 (/$bunfs/root/src/entrypoints/cli.js:7925:7500)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-11T16:13:11.878Z"}]

extent analysis

TL;DR

The issue can be resolved by configuring the autoMemoryDirectory setting to point to the correct path, /workspace/.ai/memory/, to ensure that memories are stored in the git-tracked project path instead of the user-global path.

Guidance

  • Verify that the autoMemoryDirectory setting is correctly configured in the project's settings.json file to point to /workspace/.ai/memory/.
  • Check if there are any other configurations or environment variables that might be overriding the autoMemoryDirectory setting.
  • Consider manually moving the accumulated feedback files from the user-global path to the project path to consolidate the memories.
  • Review the error messages to ensure that there are no other issues that need to be addressed, such as the lock acquisition failure or the ZodError.

Notes

The provided error messages do not seem to be directly related to the issue of memories being stored in the wrong path, but they should still be investigated to ensure that they are not causing any other problems.

Recommendation

Apply workaround: Manually configure the autoMemoryDirectory setting and move the accumulated feedback files to the correct path, as the root cause of the issue is the incorrect configuration of the autoMemoryDirectory setting.

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

claude-code - 💡(How to fix) Fix [Bug] Project autoMemoryDirectory setting ignored, defaults to global memory path instead [1 comments, 2 participants]