Bug Report
CodeGraph version: 0.9.4 → 0.9.5
OS: Windows 11 Pro 10.0.26100
Node: v24.12.0
Working directory: mapped network drive (Y:\, SMB share)
Description
Running codegraph index or any MCP tool call consistently fails with:
Failed to open SQLite via the built-in node:sqlite module.
CodeGraph requires node:sqlite (Node.js 22.5+).
Underlying error: disk I/O error
Steps to Reproduce
- Open a project on a Windows mapped network drive (e.g.,
Y:\)
- Run
codegraph init → succeeds
- Run
codegraph index → fails with disk I/O error
Workaround
- Disconnect CodeGraph MCP server
- Delete
.codegraph/codegraph.db, .db-shm, .db-wal, .lock
- Run
codegraph init && codegraph index
- Reconnect MCP server
This workaround works initially, but the error can recur if the MCP server connection drops and restarts while the SQLite WAL lock is held on the network share.
Root Cause
SQLite's WAL mode relies on strict file locking (flock/fcntl) which is unreliable over SMB/CIFS network shares. The .db-shm (shared memory) file in particular doesn't behave correctly on network filesystems.
Environment Details
Working directory: Y:\ → mapped network drive (SMB)
npm global: C:\Users\<user>\AppData\Roaming\npm
codegraph: 0.9.5 (via npm i -g @colbymchenry/codegraph)
codegraph status output:
- Backend: node:sqlite (Node built-in) — full WAL + FTS5
- Journal mode: wal (concurrent reads safe)
- Files indexed: 372, Nodes: 5234, Edges: 8559
- DB size: 9.51 MB
Suggestion
Consider adding an option to use SQLite in non-WAL journal mode (DELETE or TRUNCATE) when the project is detected on a network drive, or allow the user to configure the journal mode. This would trade some concurrent-read performance for compatibility with network filesystems.
Related: #238 (database is locked on concurrent access)
Bug Report
CodeGraph version: 0.9.4 → 0.9.5
OS: Windows 11 Pro 10.0.26100
Node: v24.12.0
Working directory: mapped network drive (
Y:\, SMB share)Description
Running
codegraph indexor any MCP tool call consistently fails with:Steps to Reproduce
Y:\)codegraph init→ succeedscodegraph index→ fails withdisk I/O errorWorkaround
.codegraph/codegraph.db,.db-shm,.db-wal,.lockcodegraph init && codegraph indexThis workaround works initially, but the error can recur if the MCP server connection drops and restarts while the SQLite WAL lock is held on the network share.
Root Cause
SQLite's WAL mode relies on strict file locking (
flock/fcntl) which is unreliable over SMB/CIFS network shares. The.db-shm(shared memory) file in particular doesn't behave correctly on network filesystems.Environment Details
Suggestion
Consider adding an option to use SQLite in non-WAL journal mode (
DELETEorTRUNCATE) when the project is detected on a network drive, or allow the user to configure the journal mode. This would trade some concurrent-read performance for compatibility with network filesystems.Related: #238 (database is locked on concurrent access)