anomalyco / anomalyco/opencode
[BUG] LSP workspaceSymbol ignores filePath and active workspace
@rekram1-node is already working on this.
Since Aug 31, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
The experimental LSP tool requires filePath for workspaceSymbol, but the service ignores that file and sends the query to every client that happens to be active. In a fresh process there may be no active client, so the same valid query returns an empty result until another LSP operation initializes one. In a multi-root repository it can instead return unrelated or duplicate symbols from other projects.
The result therefore depends on earlier LSP activity rather than the supplied file. workspaceSymbol should initialize/select the client for filePath and query only the matching workspace.
Plugins
None required
OpenCode version
1.18.25 and current dev
Steps to reproduce
- Enable the experimental LSP tool in a project with a working language server.
- In a fresh process, call workspaceSymbol for a known symbol and supply a valid source file.
- Observe an empty result because no client is active yet.
- Run hover or documentSymbol on that file to initialize its client.
- Repeat workspaceSymbol and observe that results now appear.
- In a multi-root repository, initialize another client and observe that workspaceSymbol queries both rather than the workspace for filePath.
Screenshot and/or share link
Not applicable
Operating System
macOS 26.6.2
Terminal
Not terminal-specific
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.