[BUG] System prompt hardcodes .claude path instead of resolving CLAUDE_CONFIG_DIR
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When CLAUDE_CONFIG_DIR is set to a non-default path (e.g. .claude-oopix),
the auto-memory section of the system prompt still references the hardcoded
default .claude path. The model is told its memory lives at
C:\Users\<user>\.claude\projects\<slug>\memory\ even though the real folder
in use is C:\Users\<user>\.claude-oopix\projects\<slug>\memory\.
Memory read/write itself works correctly — only the prompt text is wrong,
which misleads the model when the user asks about memory location.
The system prompt contains a hardcoded .claude path regardless of the
CLAUDE_CONFIG_DIR value.
What Should Happen?
The path in the auto-memory system-prompt section should be templated from
CLAUDE_CONFIG_DIR, not hardcoded to .claude.
Error Messages/Logs
OS: Windows 11 Home 10.0.26200
Shell: bash (Git Bash)
Claude Code version: (run `claude --version` to fill in)
Launcher: VBS script that sets CLAUDE_CONFIG_DIR before spawning VS Code
Steps to Reproduce
- Set env var before launching:
set CLAUDE_CONFIG_DIR=C:\Users\me\.claude-oopix
claude
- Ask: "Where is your memory stored?"
- Model quotes the hardcoded
.claudepath from the system prompt
instead of .claude-oopix.
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.92
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
Use case: running multiple Claude Code instances in parallel with different
CLAUDE_CONFIG_DIR values (one per subscription / project profile). Each
instance should report its own config path correctly.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗