Claude Code: Config Sync WSL → Windows + KB Workflow Recommendation
Section titled “Claude Code: Config Sync WSL → Windows + KB Workflow Recommendation”Date: 2026-02-17 Session: Sync Claude Code global config between WSL and Windows environments Status: ✅ Complete
Summary
Section titled “Summary”Diagnosed why Windows PowerShell Claude Code sessions required more permission prompts than WSL sessions. Root cause was the Windows CLAUDE.md being a minimal 48-line file vs the comprehensive 392-line WSL version. The settings.json permissions were already identical in both environments. Updated the Windows CLAUDE.md to match the WSL version (with Windows-specific additions). Also answered the Obsidian KB file management environment question.
Config File Locations
Section titled “Config File Locations”WSL (Ubuntu-24.04)
Section titled “WSL (Ubuntu-24.04)”| File | Path |
|---|---|
| Global CLAUDE.md | /home/ta/.claude/CLAUDE.md |
| Settings/Permissions | /home/ta/.claude/settings.json |
| Skills/Commands | /home/ta/.claude/commands/ |
| Memory | /home/ta/.claude/projects/-home-ta-projects-monorepo/memory/MEMORY.md |
Windows (PowerShell)
Section titled “Windows (PowerShell)”| File | Path (Windows) | Path (WSL) |
|---|---|---|
| Global CLAUDE.md | C:\Users\Admin\.claude\CLAUDE.md | /mnt/c/Users/Admin/.claude/CLAUDE.md |
| Settings/Permissions | C:\Users\Admin\.claude\settings.json | /mnt/c/Users/Admin/.claude/settings.json |
| Skills/Commands | C:\Users\Admin\.claude\commands\ | /mnt/c/Users/Admin/.claude/commands/ |
What Was Different (Root Cause Analysis)
Section titled “What Was Different (Root Cause Analysis)”settings.json — Already Identical (not the issue)
Section titled “settings.json — Already Identical (not the issue)”Both WSL and Windows had the same allow list (all tools permitted). The only differences were:
- model: WSL=“sonnet”, Windows=“opus” (intentional, not a problem)
- deny list: Windows had 3 extra Windows-specific destructive command blocks
- statusLine: Each pointed to its own script (correct)
Permission prompts were NOT caused by settings.json.
CLAUDE.md — This Was the Problem
Section titled “CLAUDE.md — This Was the Problem”| WSL | Windows (before fix) | |
|---|---|---|
| Lines | 392 | 48 |
| Task Execution Philosophy | ✅ Detailed | ❌ Missing |
| Autonomous Testing Requirements | ✅ Extensive | ❌ Missing |
| ”NEVER suggest user test” directive | ✅ Present | ❌ Missing |
| Implementation Standards | ✅ Present | ❌ Missing |
| Coaching Directive | ✅ Present | ❌ Missing |
| Testing Checklist | ✅ Present | ❌ Missing |
| KB/Task Management System | ✅ Present | ❌ Missing |
The Windows CC sessions didn’t have the autonomous execution instructions, so Claude defaulted to asking for permission at each step.
Fix Applied
Section titled “Fix Applied”Replaced C:\Users\Admin\.claude\CLAUDE.md with the WSL version as the base, keeping Windows-specific content:
- Windows environment paths (C:\Users\Admin, D:\FSS\KB)
- “When to Use Claude Code vs. Other Models” section (useful Windows-specific guidance)
- Preserved the useful Preferences section
KB File Management: WSL vs Windows Recommendation
Section titled “KB File Management: WSL vs Windows Recommendation”Recommendation: Use WSL Claude Code for ALL file management including Obsidian KB
Why WSL Wins for KB Work
Section titled “Why WSL Wins for KB Work”| Factor | WSL | Windows PowerShell |
|---|---|---|
| Bash scripting power | ✅ Native | ❌ Limited (requires PS syntax) |
| Access to KB files | ✅ /mnt/d/FSS/KB/ | ✅ D:\FSS\KB\ |
| Find/grep/sed | ✅ Fast, native | ❌ PowerShell equivalents are verbose |
| Claude Code config | ✅ Better configured | ⚠️ Now fixed, but WSL still primary |
| Script reuse | ✅ Same scripts as dev work | ❌ Separate PS scripts needed |
| Obsidian compatibility | ✅ Writes to Windows FS directly | ✅ Native |
| Path consistency | ✅ /mnt/d/ paths match CLAUDE.md | ⚠️ Windows paths require different prompts |
Key Insight
Section titled “Key Insight”WSL writes to the actual Windows filesystem when using /mnt/d/ — Obsidian cannot tell the difference. Files created or modified via WSL at /mnt/d/FSS/KB/ are identical to Windows native writes. Obsidian’s file watcher picks up changes normally.
When to Use Windows PowerShell CC (Rare Cases)
Section titled “When to Use Windows PowerShell CC (Rare Cases)”- Running Windows-only executables that can’t be called from WSL
- Tasks where Windows registry/COM objects are needed
- Debugging Windows-specific path issues
Updated Guidance for CLAUDE.md
Section titled “Updated Guidance for CLAUDE.md”The Windows CLAUDE.md Environment section now reads:
AI config SSoT: WSL
~/config-ai/(slash commands duplicated toC:\Users\Admin\.claude\commands\)
This reflects the existing pattern — WSL is the source of truth, Windows is a mirror.
Files Modified
Section titled “Files Modified”| File | Change |
|---|---|
/mnt/c/Users/Admin/.claude/CLAUDE.md | Replaced 48-line minimal version with 218-line comprehensive version matching WSL |
Diff the Files Yourself
Section titled “Diff the Files Yourself”# From WSL terminal:diff /home/ta/.claude/CLAUDE.md /mnt/c/Users/Admin/.claude/CLAUDE.mdThe remaining differences will be intentional:
- Environment section (WSL vs Windows paths)
- “When to Use Claude Code vs. Other Models” section (Windows-only, useful to keep)
- Preferences section (Windows-only, useful to keep)
Next Steps (Optional)
Section titled “Next Steps (Optional)”- Verify: Open a new Windows PowerShell Claude Code session and confirm no permission prompts for standard file operations
- Consider: Whether the WSL CLAUDE.md should also get the “When to Use CC vs. Other Models” section (it’s useful everywhere)
- Consider: Whether to eliminate Windows CC sessions entirely and just use WSL for everything — this would remove the config sync burden