|
| 1 | +# Windows and WSL guide |
| 2 | + |
| 3 | +claude-obsidian supports native Windows as a read-only platform and WSL as the |
| 4 | +full-capability platform. This guide covers what works where, why the boundary |
| 5 | +exists, and how to unstick WSL when it misbehaves. |
| 6 | + |
| 7 | +## Platform support |
| 8 | + |
| 9 | +| Capability | WSL / Linux / macOS | Native Windows (incl. Git Bash) | |
| 10 | +|---|---|---| |
| 11 | +| Inspection, dry-run previews, retrieval | Yes | Yes | |
| 12 | +| Vault writes (`transaction apply`, `init`, `adopt`, `migrate`, `capture apply`, `mode set`) | Yes | No — refused with `UNSUPPORTED_PLATFORM` | |
| 13 | +| Capture queue commands (including read-only `capture queue list`) | Yes | No — currently refused; tracked in [#151](https://github.com/AgriciDaniel/claude-obsidian/issues/151) | |
| 14 | +| Git checkpoints (`checkpoint`) | Linux and macOS only | No | |
| 15 | +| Bash setup scripts and shell test suites | Yes | No (POSIX-only) | |
| 16 | + |
| 17 | +Vaults must live on a filesystem with stable file identity: NTFS is fine, but |
| 18 | +FAT/exFAT volumes (typical USB sticks) and some network shares are refused with |
| 19 | +`UNSAFE_VAULT_IDENTITY` — move the vault to NTFS or work inside WSL. |
| 20 | + |
| 21 | +## Why writes require WSL |
| 22 | + |
| 23 | +Mutation safety is bound to POSIX directory descriptors: the vault root and |
| 24 | +every runtime directory stay pinned for the whole write, so a concurrently |
| 25 | +swapped symlink or replaced folder fails closed instead of redirecting the |
| 26 | +write (see the [compound vault guide](compound-vault-guide.md)). Native Windows |
| 27 | +cannot provide those primitives, so writes are refused up front rather than |
| 28 | +silently running with weaker guarantees. |
| 29 | + |
| 30 | +A degraded native-Windows write mode — default-off, behind an explicit |
| 31 | +reduced-guarantees flag — is under consideration in |
| 32 | +[#151](https://github.com/AgriciDaniel/claude-obsidian/issues/151). If WSL is a |
| 33 | +blocker for you, that issue is the place to weigh in. |
| 34 | + |
| 35 | +## WSL troubleshooting |
| 36 | + |
| 37 | +WSL being "installed" does not always mean WSL is working. Symptoms and checks, |
| 38 | +roughly in the order worth trying: |
| 39 | + |
| 40 | +| Symptom | Check | |
| 41 | +|---|---| |
| 42 | +| `wsl --install` completed but `wsl --status` or `wsl -l -v` hangs indefinitely | This is usually a virtualization conflict, not a claude-obsidian issue. Work through the virtualization checklist below. | |
| 43 | +| `wsl` reports a kernel or version error | Run `wsl --update`, then `wsl --shutdown`, then retry. | |
| 44 | +| WSL worked before and stopped after an update or new security software | Check whether memory integrity / Virtualization-Based Security settings changed; VBS and other hypervisors can conflict with the Hyper-V platform WSL 2 depends on. | |
| 45 | +| Approval hash from a native dry-run fails inside WSL with `PLAN_CHANGED` | By design: the approval hash binds the reviewing environment's filesystem identity. Run the dry-run review inside WSL when the apply will happen there; a natively produced `approved_plan_sha256` cannot be replayed from WSL. | |
| 46 | +| Writes fail with `UNSAFE_VAULT_IDENTITY` mentioning stable file identity | The vault sits on FAT/exFAT or an unsupported network share. Move it to NTFS, or keep it inside the WSL filesystem. | |
| 47 | + |
| 48 | +Virtualization checklist for the hang class: |
| 49 | + |
| 50 | +1. Confirm virtualization is enabled in BIOS/UEFI (often "Intel VT-x", |
| 51 | + "AMD-V", or "SVM"). |
| 52 | +2. Confirm the Windows features "Virtual Machine Platform" and "Windows |
| 53 | + Subsystem for Linux" are both enabled, and reboot after enabling them — |
| 54 | + the reboot is not optional. |
| 55 | +3. Run `wsl --update` from an elevated prompt, then `wsl --shutdown`, then |
| 56 | + retry `wsl --status`. |
| 57 | +4. Check that the Hyper-V "Host Compute Service" (`vmcompute`) is running; |
| 58 | + restart it if stopped. |
| 59 | +5. If hangs persist, look for conflicts between Virtualization-Based Security |
| 60 | + (memory integrity) or third-party hypervisors and the Hyper-V platform — |
| 61 | + this conflict class is hardware- and configuration-specific and can survive |
| 62 | + reboots until the conflicting feature is reconfigured. |
| 63 | + |
| 64 | +## Working across the boundary |
| 65 | + |
| 66 | +The supported native-Windows workflow is: inspect and review natively, mutate |
| 67 | +inside WSL. Because approval hashes bind to the environment that produced |
| 68 | +them, do the reviewed dry-run in the same environment that will run the apply. |
| 69 | +Keeping the vault inside the WSL filesystem (rather than on a mounted Windows |
| 70 | +drive) avoids both the identity caveats above and cross-boundary performance |
| 71 | +overhead. |
0 commit comments