Skip to content

LSP workspaceSymbol is always send with empty query #23075

Closed

Description

@WillTer

Description

Hello. I've found this when trying to work with clangd. It can't search symbols using workspaceSymbol function and always returns something irrelevant.
In logs of clangd a json's for requests are always send with empty query and it's clearly written in code:

return lsp.workspaceSymbol("")

Why so? Is it constraint for some other LSP?

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Apr 17, 2026
  2. VladD2 commented on Apr 17, 2026

    @VladD2

    I can confirm this bug. Based on my testing with a clangd proxy, I would like to supplement the technical analysis. Please fix these bugs in the following way:

    1. Update the Tool Schema: Remove filePath, line, and character from the "required" list for the workspaceSymbol operation. Instead, make a "query" (string) parameter mandatory.

    2. Pass the Argument: Ensure that the actual query string provided by the model is passed into the lsp.workspaceSymbol(query) call instead of the current hardcoded empty string.

    3. Align with LSP Specification: Ensure the tool follows the standard WorkspaceSymbolParams as defined in the official Microsoft LSP 3.17 Specification.

    Since workspace/symbol is a global search by design, it should not be architecturally tied to a specific file path or coordinates. This adjustment will allow the LLM to perform proper project-wide discovery, which is critical for identifying symbols definitions across the entire repo / project.

  3. VladD2 commented on Apr 17, 2026

    @VladD2

    Related issue - #3116

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcoreAnything pertaining to core functionality of the application (opencode server stuff)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions