Body
Summary
When the same repo is used from both Windows and WSL, and the repo lives
under /mnt/c/..., CodeGraph can fail in WSL with disk I/O error unless
CODEGRAPH_DIR is manually split (for example .codegraph on Windows and
.codegraph-wsl on WSL).
It looks like CodeGraph already knows this scenario is unsafe, but the
default behavior still allows WSL to hit the Windows-owned .codegraph
first.
Environment
- Windows 11
- WSL
- repo located at
/mnt/c/...
- same repo accessed from both Windows and WSL
- CodeGraph version: 1.0.1
Actual behavior
From WSL, CodeGraph failed with:
Failed to get status: disk I/O error
Explore failed: disk I/O error
Daemon log also showed socket issues on /mnt/c/...:
Failed to start server: listen ENOTSUP: operation not supported on socket /mnt/c/.../.codegraph/daemon.sock
There was also fallback to a Windows named pipe, but the DB path still caused
failure.
Expected behavior
On WSL for repos under /mnt/<drive>/..., CodeGraph should either:
- automatically use a separate per-project data dir such as
.codegraph- wsl, or
- fail with a clear actionable message explaining that Windows and WSL must
not share the same .codegraph and recommending CODEGRAPH_DIR=.codegraph- wsl.
Workaround
I fixed it locally by making WSL use:
CODEGRAPH_DIR=.codegraph-wsl
After that:
- WSL used .codegraph-wsl
- Windows kept using .codegraph
- codegraph status and codegraph explore worked normally from WSL
## Notes
The current source/docs already seem aware of this issue:
- shared Windows/WSL index risks corruption
- CODEGRAPH_DIR is the intended mitigation
So this seems less like missing capability and more like missing automatic
handling / missing diagnostic UX.
Body
Summary
When the same repo is used from both Windows and WSL, and the repo lives
under
/mnt/c/..., CodeGraph can fail in WSL withdisk I/O errorunlessCODEGRAPH_DIRis manually split (for example.codegraphon Windows and.codegraph-wslon WSL).It looks like CodeGraph already knows this scenario is unsafe, but the
default behavior still allows WSL to hit the Windows-owned
.codegraphfirst.
Environment
/mnt/c/...Actual behavior
From WSL, CodeGraph failed with:
Failed to get status: disk I/O errorExplore failed: disk I/O errorDaemon log also showed socket issues on
/mnt/c/...:Failed to start server: listen ENOTSUP: operation not supported on socket /mnt/c/.../.codegraph/daemon.sockThere was also fallback to a Windows named pipe, but the DB path still caused
failure.
Expected behavior
On WSL for repos under
/mnt/<drive>/..., CodeGraph should either:.codegraph- wsl, ornot share the same
.codegraphand recommendingCODEGRAPH_DIR=.codegraph- wsl.Workaround
I fixed it locally by making WSL use:
CODEGRAPH_DIR=.codegraph-wsl After that: - WSL used .codegraph-wsl - Windows kept using .codegraph - codegraph status and codegraph explore worked normally from WSL ## Notes The current source/docs already seem aware of this issue: - shared Windows/WSL index risks corruption - CODEGRAPH_DIR is the intended mitigation So this seems less like missing capability and more like missing automatic handling / missing diagnostic UX.