Troubleshooting¶
Language server won't start¶
Symptom: start_lsp returns an error or times out.
Check 1: Is the language server installed?
agent-lsp orchestrates existing language servers. It doesn't bundle them. Verify the server is on your PATH:
# Go
gopls version
# TypeScript
typescript-language-server --version
# Python
pyright --version
# Rust
rust-analyzer --version
# Java
# jdtls is typically installed via VS Code or manually
If the server is installed but not on PATH, or you want a custom binary or
flags for one language while keeping auto-detection for the rest, run agent-lsp
with --merge-config and point the entry at the full path. See
Choosing which language servers to run.
Check 2: Spawn logs
agent-lsp captures language server startup output:
This shows the exact command used and any startup errors.
Check 3: Increase broker timeout
On slow machines or large workspaces:
"broker did not start within 10 seconds" (Windows)¶
This was a known issue fixed in v0.12.0. Upgrade to the latest version:
If the issue persists, check the spawn logs and ensure the broker timeout is sufficient.
Empty results from queries¶
Symptom: find_references, go_to_definition, etc. return empty results.
Cause: The language server hasn't finished indexing.
Fix: Use start_lsp with ready_timeout_seconds:
This blocks until the language server reports its workspace index is complete. Servers like jdtls (Java) can take 30-60 seconds to import Gradle/Maven projects.
"No client for file" errors¶
Cause: agent-lsp doesn't know which language server handles the file.
Fix: Call start_lsp with the project root before querying files:
agent-lsp auto-detects the language from file extensions. If auto-detection fails, specify language_id explicitly:
Daemon mode issues¶
Check daemon status:
This shows running daemon PIDs and socket paths.
Kill stale daemons:
If a daemon is stuck, remove the PID file and restart:
MCP client can't find agent-lsp¶
Check: Is agent-lsp on your PATH?
If not, install it:
Or use the full path in your MCP client config:
Debug logging¶
Enable verbose logging to diagnose issues:
Or at runtime via the set_log_level tool:
See Environment Variables for all configuration options.