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

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

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

Originally assigned to: @thdxr on GitHub.

Description

Multiple users 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() was synchronous → blocked UI thread when LSP servers were 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 Overlap with #13306
#13306 Non-blocking init + configurable diagnostics timeout Open Primary comprehensive fix
#13281 Diagnostics timeout 3s→10s Open Absorbed into #13306
#6997 Configurable timeout Open Partially addressed by #13306 env var
#13287 Startup package-manager timeout guard Open Independent (different timeout)
#13299 UI freeze on large diffs Open Independent (rendering issue)

Resolution Path:

Addressed by PR #13306:

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

Remaining work (separate concerns):

  • Startup timeout (#13287)
  • UI rendering performance (#13299)

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 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()` was synchronous → blocked UI thread when LSP servers were 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 | Overlap with #13306 | |---|---|---|---| | #13306 | Non-blocking init + configurable diagnostics timeout | Open | Primary comprehensive fix | | #13281 | Diagnostics timeout 3s→10s | Open | Absorbed into #13306 | | #6997 | Configurable timeout | Open | Partially addressed by #13306 env var | | #13287 | Startup package-manager timeout guard | Open | Independent (different timeout) | | #13299 | UI freeze on large diffs | Open | Independent (rendering issue) | **Resolution Path:** Addressed by PR #13306: - ✅ Non-blocking LSP initialization (`getClients` returns immediately) - ✅ Configurable diagnostics timeout (10s default, override via `OPENCODE_EXPERIMENTAL_LSP_DIAGNOSTICS_TIMEOUT_MS`) Remaining work (separate concerns): - Startup timeout (#13287) - UI rendering performance (#13299) ### 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 perfneeds:compliance labels 2026-02-16 18:11:49 -05:00
yindo closed this issue 2026-02-16 18:11:49 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 12, 2026):

This issue doesn't fully meet our contributing guidelines.

What needs to be fixed:

  • This issue must use one of the three required templates: Bug Report, Feature Request, or Question. Currently it uses a custom format.
  • Please reopen this as a standard Bug Report (describing the LSP freezing/timeout issues) or use the appropriate template for your issue type.

Please edit or reopen this issue to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions[bot] commented on GitHub (Feb 12, 2026): <!-- issue-compliance --> This issue doesn't fully meet our [contributing guidelines](../blob/dev/CONTRIBUTING.md). **What needs to be fixed:** - This issue must use one of the three required templates: Bug Report, Feature Request, or Question. Currently it uses a custom format. - Please reopen this as a standard Bug Report (describing the LSP freezing/timeout issues) or use the appropriate template for your issue type. Please edit or reopen this issue to address the above within **2 hours**, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know.
Author
Owner

@ojh102 commented on GitHub (Feb 12, 2026):

Closing to recreate with proper Bug Report template.

@ojh102 commented on GitHub (Feb 12, 2026): Closing to recreate with proper Bug Report template.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9175