Version: 0.20.15
OS: Windows 11
Command: headroom learn --all --apply
Steps to reproduce
- Have a Claude Code project in a directory whose path contains spaces
(e.g. C:\Users\<name>\Desktop\Claude Code Projects)
- Run
headroom learn --all — dry run completes fine
- Run
headroom learn --all --apply — crashes
Error
FileNotFoundError: [WinError 161] The specified path is invalid: '\\\\\\Users\\AegeanPulse\\Desktop\\Claude'
Root cause
In headroom/learn/plugins/claude.py, the _decode_project_path() function (and the fallback in discover_projects()) reconstructs a Windows path from Claude Code's encoded project directory name by splitting on - and rejoining with \\:
drive = parts[0].upper()
win_path = Path(f"{drive}:\\" + "\\".join(parts[1:]))
Two issues:
- Spaces in directory names are encoded as
- (same as path separators), so Claude-Code-Projects is decoded as three separate path components instead of one directory named "Claude Code Projects".
- The drive letter f-string (
f"{drive}:\\") already ends with a backslash, making the path boundary \\\ (interpreted as UNC) rather than \\.
Expected behaviour
headroom learn --apply writes recommendations to the correct path:
C:\Users\<name>\Desktop\Claude Code Projects\CLAUDE.md
Workaround
Manually apply the recommendations printed by the dry run.
Version: 0.20.15
OS: Windows 11
Command:
headroom learn --all --applySteps to reproduce
(e.g.
C:\Users\<name>\Desktop\Claude Code Projects)headroom learn --all— dry run completes fineheadroom learn --all --apply— crashesError
Root cause
In
headroom/learn/plugins/claude.py, the_decode_project_path()function (and the fallback indiscover_projects()) reconstructs a Windows path from Claude Code's encoded project directory name by splitting on-and rejoining with\\:Two issues:
-(same as path separators), soClaude-Code-Projectsis decoded as three separate path components instead of one directory named "Claude Code Projects".f"{drive}:\\") already ends with a backslash, making the path boundary\\\(interpreted as UNC) rather than\\.Expected behaviour
headroom learn --applywrites recommendations to the correct path:C:\Users\<name>\Desktop\Claude Code Projects\CLAUDE.mdWorkaround
Manually apply the recommendations printed by the dry run.