Skip to content

lsp_diagnostics hangs with nixd #20641

Closed as not planned
Closed as not planned

Description

@rimmer

Description

OpenCode appears to hang indefinitely when running lsp_diagnostics against nixd.

OpenCode waits indefinitely / appears stale. This reproduces even with all OpenCode plugins disabled.

What I verified by asking the agent to debug by talking to nixd directly:

  • initialize succeeds immediately
  • nixd does NOT advertise diagnosticProvider in server capabilities
  • nixd DOES publish diagnostics via textDocument/publishDiagnostics
  • If a client sends textDocument/diagnostic, nixd never returns a response because it does not support pull diagnostics

My suspicion is that if the server does not advertise diagnosticProvider, OpenCode should not wait on textDocument/diagnostic

Environment

  • nixd 2.9.0
  • OpenCode generated config has no custom lsp section
  • Reproduced with plugins disabled

Plugins

No response

OpenCode version

1.3.2

Steps to reproduce

Repro:

  1. Use OpenCode with nixd in a Nix repo
  2. Run lsp_diagnostics on a .nix file

Screenshot and/or share link

No response

Operating System

NixOS

Terminal

Konsole (KDE), Console (GNOME)

Activity

  1. added
    bug
    on Apr 2, 2026
  2. added
    core
    perf
    on Apr 2, 2026
  3. removed
    bug
    perf
    core
    on May 3, 2026
  4. github-actions commented on Jul 4, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions