Troubleshooting
Index Issues
Section titled “Index Issues”krait init shows indexed 0 files, 0 symbols
Section titled “krait init shows indexed 0 files, 0 symbols”With a warning line: the warning tells you exactly what’s wrong. Common causes:
| Warning | Cause | Fix |
|---|---|---|
gopls is installed but requires go in PATH | Go toolchain missing | Install Go from go.dev/dl |
failed to install gopls: Go is required | gopls not installed, no Go in PATH | Install Go, then krait server install go |
no LSP server configured for <lang> | Language not supported | Check Language Support |
With no warning: the LSP server may not be installed.
krait server list # see what's installedkrait server install <lang>krait init --forcekrait init re-indexes everything every time
Section titled “krait init re-indexes everything every time”The index is content-addressed (BLAKE3 hashes). Files only re-index when their content changes. If everything re-indexes on each run, the .krait/index.db may have been deleted or is being regenerated.
Check that .krait/ is not in your .gitignore or being cleaned by another tool.
Symbols are stale after editing a file
Section titled “Symbols are stale after editing a file”The file watcher marks edited files dirty within ~500ms. If symbols appear stale:
krait status # check "dirty files" countkrait init --force # full re-index if watcher has fallen behindDaemon Issues
Section titled “Daemon Issues”krait status hangs or returns no output
Section titled “krait status hangs or returns no output”The daemon may have crashed. Remove the stale socket and restart:
krait daemon stop # cleans up PID + socket fileskrait status # daemon auto-restartskrait daemon start fails with “already running”
Section titled “krait daemon start fails with “already running””A stale PID file exists from a previous crash. Stop the daemon to clean it up:
krait daemon stopkrait daemon startDaemon shuts down unexpectedly
Section titled “Daemon shuts down unexpectedly”The daemon idles out after 30 minutes of inactivity by default. It auto-restarts on the next command — no manual action needed.
To keep it alive longer, set KRAIT_IDLE_TIMEOUT (in seconds) before starting:
KRAIT_IDLE_TIMEOUT=3600 krait daemon start # 1 hourLSP Server Issues
Section titled “LSP Server Issues”krait server install <lang> fails
Section titled “krait server install <lang> fails”| Error | Fix |
|---|---|
Go is required but not found in PATH | Install Go from go.dev/dl |
Node.js is required but not found in PATH | Install Node.js from nodejs.org |
Homebrew is required but not found in PATH | Install Homebrew or use the language’s native install method |
npm install failed | Check npm registry access; try npm install manually |
krait server list shows a server as not installed
Section titled “krait server list shows a server as not installed”Run the install command shown in the output:
krait server install rust # installs rust-analyzerkrait server install go # installs goplsA language server keeps crashing
Section titled “A language server keeps crashing”krait server status # see running LSP processeskrait daemon stop # full restartkrait status # re-boot all serversIf crashes persist, the language server binary may be corrupted. Remove managed servers and reinstall:
krait server clean # removes ~/.krait/servers/krait server install <lang>macOS-Specific Issues
Section titled “macOS-Specific Issues”krait binary crashes immediately (exit 137)
Section titled “krait binary crashes immediately (exit 137)”After installing or updating the krait binary, macOS may cache the old binary’s security state. Overwriting a binary in-place with cp can trigger this.
Fix: Remove the old binary before copying:
rm /usr/local/bin/kraitcp ./target/release/krait /usr/local/bin/kraitspctl --assess reports rejected
Section titled “spctl --assess reports rejected”spctl checks against the App Store or Developer ID policy. Locally built binaries are always rejected by this check, but they still run fine. This is not an error.
Command Errors
Section titled “Command Errors”error: LSP servers still indexing
Section titled “error: LSP servers still indexing”The daemon just started and language servers are still loading. Wait a few seconds:
krait status # check "pending" countRetry the command once krait status shows no pending servers.
no results from krait find symbol
Section titled “no results from krait find symbol”- The symbol name may be misspelled or use wrong casing (symbol lookup is exact)
- The file may not be indexed yet — run
krait init - The language server may still be loading — check
krait status
Try a text search as a fallback:
krait search MySymbol src/krait check returns no diagnostics on a file with errors
Section titled “krait check returns no diagnostics on a file with errors”The language server may not have finished loading the file. Wait for krait status to show no pending servers, then retry. If the issue persists, the file may be outside the indexed workspace — verify with krait status.
Getting More Information
Section titled “Getting More Information”Run any command with RUST_LOG=krait=debug to see detailed logs from the CLI:
RUST_LOG=krait=debug krait find symbol MyStructFor daemon-level logs, run the daemon in the foreground:
krait daemon stopRUST_LOG=krait=debug krait daemon start # keep terminal openThen run your command in a second terminal.