Skip to content

Troubleshooting

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:

WarningCauseFix
gopls is installed but requires go in PATHGo toolchain missingInstall Go from go.dev/dl
failed to install gopls: Go is requiredgopls not installed, no Go in PATHInstall Go, then krait server install go
no LSP server configured for <lang>Language not supportedCheck Language Support

With no warning: the LSP server may not be installed.

Terminal window
krait server list # see what's installed
krait server install <lang>
krait init --force

krait 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.

The file watcher marks edited files dirty within ~500ms. If symbols appear stale:

Terminal window
krait status # check "dirty files" count
krait init --force # full re-index if watcher has fallen behind

The daemon may have crashed. Remove the stale socket and restart:

Terminal window
krait daemon stop # cleans up PID + socket files
krait status # daemon auto-restarts

krait 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:

Terminal window
krait daemon stop
krait daemon start

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:

Terminal window
KRAIT_IDLE_TIMEOUT=3600 krait daemon start # 1 hour

ErrorFix
Go is required but not found in PATHInstall Go from go.dev/dl
Node.js is required but not found in PATHInstall Node.js from nodejs.org
Homebrew is required but not found in PATHInstall Homebrew or use the language’s native install method
npm install failedCheck 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:

Terminal window
krait server install rust # installs rust-analyzer
krait server install go # installs gopls
Terminal window
krait server status # see running LSP processes
krait daemon stop # full restart
krait status # re-boot all servers

If crashes persist, the language server binary may be corrupted. Remove managed servers and reinstall:

Terminal window
krait server clean # removes ~/.krait/servers/
krait server install <lang>

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:

Terminal window
rm /usr/local/bin/krait
cp ./target/release/krait /usr/local/bin/krait

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.


The daemon just started and language servers are still loading. Wait a few seconds:

Terminal window
krait status # check "pending" count

Retry the command once krait status shows no pending servers.

  • 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:

Terminal window
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.


Run any command with RUST_LOG=krait=debug to see detailed logs from the CLI:

Terminal window
RUST_LOG=krait=debug krait find symbol MyStruct

For daemon-level logs, run the daemon in the foreground:

Terminal window
krait daemon stop
RUST_LOG=krait=debug krait daemon start # keep terminal open

Then run your command in a second terminal.