LSP as Agent Baseline
Language Server Protocol (LSP) should be a baseline capability for serious coding agents, but not the source of truth for correctness. LSP gives agents IDE-grade local facts:- symbol lookup
- go-to-definition
- references
- diagnostics
- hover/type information
- safe rename support
- document symbols and workspace symbols
Role in the Agent Stack
LSP belongs in the execution substrate, not in the bus.
omp (oh-my-pi) is the current reference: it treats LSP/DAP as core worker infrastructure. That makes it a better L2 candidate for code-changing tasks than pure text-only subprocess agents.
Startup Policy
Do not start every language server at global session startup. Use a lazy, per-project policy:- Detect stack from project profile or files.
- Enable only matching LSP plugins/servers.
- Start on first code task, not on chat-only sessions.
- Reuse one server per workspace/worktree while the session is active.
- Stop with the session or let the harness/plugin own lifecycle cleanup.
Neovim/Mason exception
If the human operator uses Neovim as IDE replacement and Mason as LSP/DAP manager, distinguish two lanes:
Do not duplicate Mason-managed LSPs by globally enabling every Claude Code LSP plugin. Use Neovim/Mason as the operator evidence surface and LSP-aware runners as the autonomous execution surface.
Recommended Server Mapping
Claude Code plugin settings already expose these as optional LSP plugins; keep them disabled globally unless the project profile selects them.
Verification Ladder
LSP is a fast feedback layer, not enough by itself. Order for code agents:- LSP diagnostics for immediate local errors.
- Typecheck/compiler for authoritative static correctness.
- Unit/integration tests for behavior.
- Diff review and human approval for intent and risk.
Commandr/DiffViewer Implication
Commandr should treat LSP as runner capability metadata, not bus state. A futurecommandr-omp-runner or LSP-aware runner can emit neutral progress such as “LSP diagnostics clean” or attach a review artifact, but it should not write raw language-server caches or diagnostics streams into .agents/.
DiffViewer/Tauri should surface LSP-derived evidence in the UI:
- diagnostics panel per task/session
- symbol/caller context on diff cards
- “diagnostics clean/dirty” badge on review packages
- safe-rename/blast-radius evidence when a change touches exported symbols