fix(claude): deploy CLAUDE.md via xdg.configFile to respect CLAUDE_CONFIG_DIR#20
Merged
borland502 merged 1 commit intomainfrom May 1, 2026
Merged
Conversation
…NFIG_DIR Move Claude Code global instructions from home.file (which hardcodes ~/.claude/CLAUDE.md) to xdg.configFile so they land at $XDG_CONFIG_HOME/claude/CLAUDE.md, consistent with the CLAUDE_CONFIG_DIR env var exported in zsh.nix. Also bumps stylix flake input to latest revision.
borland502
added a commit
that referenced
this pull request
May 4, 2026
Claude Code's memory-file loader hardcodes ~/.claude/CLAUDE.md and does not honor CLAUDE_CONFIG_DIR (per https://code.claude.com/docs/en/memory.md). PR #20 moved CLAUDE.md to the XDG location alone, which silently broke auto-loading — Claude Code launched blind to the user's directives until told to read the file explicitly. Deploy the same source to both paths: XDG remains the canonical location, and ~/.claude/CLAUDE.md becomes a forwarding pointer the loader can find. Comments in common.nix flag this as a workaround pending an upstream fix that teaches the loader to follow CLAUDE_CONFIG_DIR.
borland502
added a commit
that referenced
this pull request
May 4, 2026
* fix(claude): restore ~/.claude/CLAUDE.md so memory file auto-loads Claude Code's memory-file loader hardcodes ~/.claude/CLAUDE.md and does not honor CLAUDE_CONFIG_DIR (per https://code.claude.com/docs/en/memory.md). PR #20 moved CLAUDE.md to the XDG location alone, which silently broke auto-loading — Claude Code launched blind to the user's directives until told to read the file explicitly. Deploy the same source to both paths: XDG remains the canonical location, and ~/.claude/CLAUDE.md becomes a forwarding pointer the loader can find. Comments in common.nix flag this as a workaround pending an upstream fix that teaches the loader to follow CLAUDE_CONFIG_DIR. * fix: update terminal defaults and instructions for shell usage and command handling
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CLAUDE.md) fromhome.filetoxdg.configFileso it is deployed to$XDG_CONFIG_HOME/claude/CLAUDE.mdinstead of the hardcoded~/.claude/CLAUDE.md.CLAUDE_CONFIG_DIRenv var exported inzsh.nix, which points to$XDG_CONFIG_HOME/claude.stylixflake input to the latest upstream revision (a2538cd).Why
The previous
home.fileapproach ignored theCLAUDE_CONFIG_DIRenv var and always wrote to~/.claude/CLAUDE.md. By switching toxdg.configFile, the file lands where Claude Code actually looks for it whenCLAUDE_CONFIG_DIRis set.Reviewer notes
home.filethat mentioned Claude has been removed since it no longer applies.🤖 Generated with Claude Code