[Bug] CLAUDE_CONFIG_DIR env var ignored; still loads ~/.claude/CLAUDE.md

Resolved 💬 4 comments Opened Apr 12, 2026 by samkeen Closed Jun 15, 2026

Bug Description
if I set CLAUDE_CONFIG_DIR to something other than ~/.claude , claude code still reads ~/.claude/CLAUDE.md \
I would expect anything in ~/.claude/ to be ignored as per the docs: https://code.claude.com/docs/en/claude-directory\
\
ex:\
❯ can you read the CLAUDE_CONFIG_DIR env var

⏺ Bash(echo "$CLAUDE_CONFIG_DIR")
⎿ /Users/sam/x

⏺ The CLAUDE_CONFIG_DIR environment variable is set to /Users/sam/x.
❯ have read any CLAUDE.md files in the session
⏺ I haven't explicitly read any CLAUDE.md files with the Read tool, but the
system automatically loaded one into my context:

  • /Users/sam/.claude/CLAUDE.md — This was injected as part of the "claudeMd"

system context at the start of the session. It contains instructions about
code implementation, testing, logging, research (llms.txt), and Python
projects (use uv).
Notably, since CLAUDE_CONFIG_DIR is set to /Users/sam/x, there might also be
a CLAUDE.md at /Users/sam/x/CLAUDE.md that could be relevant. Want me to
check if one exists there?

Environment Info

  • Platform: darwin
  • Terminal: vscode
  • Version: 2.1.104
  • Feedback ID: 60e32b27-3d39-4494-96d9-06ce821db75d

Errors

[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/sam/.local/share/claude/versions/2.1.104 (expected in multi-process scenarios)\n    at Tc_ (/$bunfs/root/src/entrypoints/cli.js:2836:2153)\n    at Se6 (/$bunfs/root/src/entrypoints/cli.js:2836:1233)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-12T17:46:28.611Z"}]

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗