[Bug] LSP freezes and diagnostics timeout too short (3s) for heavy language servers #9174

Open
opened 2026-02-16 18:11:49 -05:00 by yindo · 0 comments
Owner

Originally created by @ojh102 on GitHub (Feb 12, 2026).

Originally assigned to: @thdxr on GitHub.

Description

Multiple users are experiencing LSP-related freezes and timeouts across different scenarios:

  • Kotlin LSP exceeding 45s timeout (#7477)
  • ESLint diagnostics timing out at 3s, returning empty results (#13272)
  • Windows app freezes related to blocking LSP operations (#13154)

Root Cause Analysis:

  1. Blocking initialization: getClients() blocks the UI thread when LSP servers are slow to start
  2. Insufficient timeout defaults: Diagnostics timeout was hardcoded at 3s — too short for heavy linters like ESLint and Kotlin LSP
  3. No user escape hatch: No way for users to configure timeouts for their specific environment

Related PRs:

PR Approach Status
#13332 Non-blocking init + configurable diagnostics timeout Open
#13281 Diagnostics timeout 3s→10s Open
#6997 Configurable per-server timeout via config Open
#13287 Startup package-manager timeout guard Open (independent)
#13299 UI freeze on large diffs Open (independent)

Resolution Path:

Addressed by PR #13332:

  • Non-blocking LSP initialization (getClients returns immediately)
  • Configurable diagnostics timeout (10s default, override via OPENCODE_EXPERIMENTAL_LSP_DIAGNOSTICS_TIMEOUT_MS)

Remaining work (separate concerns):

  • Per-server timeout config (#6997) — more granular control
  • Startup timeout (#13287) — different timeout location
  • UI rendering performance (#13299) — not LSP-related

Plugins

No response

OpenCode version

dev (latest)

Steps to reproduce

  1. Open a project with a heavy LSP (e.g., Kotlin, ESLint with many plugins)
  2. Start OpenCode
  3. Observe: UI blocks during LSP initialization, and diagnostics timeout at 3s returning empty results for slow language servers

Screenshot and/or share link

No response

Operating System

Cross-platform (reported on macOS, Windows, Linux)

Terminal

Multiple terminals affected (not terminal-specific)

Originally created by @ojh102 on GitHub (Feb 12, 2026). Originally assigned to: @thdxr on GitHub. ### Description Multiple users are experiencing LSP-related freezes and timeouts across different scenarios: - **Kotlin LSP** exceeding 45s timeout (#7477) - **ESLint diagnostics** timing out at 3s, returning empty results (#13272) - **Windows app freezes** related to blocking LSP operations (#13154) **Root Cause Analysis:** 1. **Blocking initialization**: `getClients()` blocks the UI thread when LSP servers are slow to start 2. **Insufficient timeout defaults**: Diagnostics timeout was hardcoded at 3s — too short for heavy linters like ESLint and Kotlin LSP 3. **No user escape hatch**: No way for users to configure timeouts for their specific environment **Related PRs:** | PR | Approach | Status | |---|---|---| | #13332 | Non-blocking init + configurable diagnostics timeout | Open | | #13281 | Diagnostics timeout 3s→10s | Open | | #6997 | Configurable per-server timeout via config | Open | | #13287 | Startup package-manager timeout guard | Open (independent) | | #13299 | UI freeze on large diffs | Open (independent) | **Resolution Path:** Addressed by PR #13332: - ✅ Non-blocking LSP initialization (`getClients` returns immediately) - ✅ Configurable diagnostics timeout (10s default, override via `OPENCODE_EXPERIMENTAL_LSP_DIAGNOSTICS_TIMEOUT_MS`) Remaining work (separate concerns): - Per-server timeout config (#6997) — more granular control - Startup timeout (#13287) — different timeout location - UI rendering performance (#13299) — not LSP-related ### Plugins _No response_ ### OpenCode version dev (latest) ### Steps to reproduce 1. Open a project with a heavy LSP (e.g., Kotlin, ESLint with many plugins) 2. Start OpenCode 3. Observe: UI blocks during LSP initialization, and diagnostics timeout at 3s returning empty results for slow language servers ### Screenshot and/or share link _No response_ ### Operating System Cross-platform (reported on macOS, Windows, Linux) ### Terminal Multiple terminals affected (not terminal-specific)
yindo added the perf label 2026-02-16 18:11:49 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9174