CLAUDE.md @import does not reliably resolve absolute Windows paths containing spaces
Bug description
The @path import syntax in CLAUDE.md / CLAUDE.local.md does not reliably resolve an
absolute Windows path that contains spaces. Instead of being replaced by the target
file's contents, the import shows up as literal, unexpanded text in the system prompt/context.
Repro
- Create a
CLAUDE.local.mdin a project whose only content is an@importline
pointing at an absolute Windows path containing one or more spaces, e.g.:
@C:\Users\<user>\Some Folder With Spaces\CLAUDE.md
- Start a session in that project.
Expected
The referenced file's content is injected into context in place of the @import line,
same as it is for paths without spaces.
Actual
The system prompt shows the literal unexpanded string@C:\Users\<user>\Some Folder With Spaces\CLAUDE.md
instead of the target file's content — even though the raw content of CLAUDE.local.md
itself is always injected automatically every session.
Workaround
Inline the referenced content directly into CLAUDE.local.md (with a comment pointing
back to the canonical file to keep them in sync) instead of relying on @import when the
path has spaces.
Environment
- Windows 11 Pro
- Claude Code desktop app