clangd LSP always fails #6871

Open
opened 2026-02-16 18:05:29 -05:00 by yindo · 1 comment
Owner

Originally created by @scarf005 on GitHub (Jan 19, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

clangd sometimes reports bogus STL include errors (e.g. <string> not found) even when a project provides a CMake-generated compile_commands.json (often via a symlink).

Plugins

No response

OpenCode version

1.1.26

Steps to reproduce

  1. open C++ project
  2. ask agent to work on an issue
  3. when agents tries to use clangd LSP, they get an bogus error messages like missing std::string

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Originally created by @scarf005 on GitHub (Jan 19, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description clangd sometimes reports bogus STL include errors (e.g. `<string>` not found) even when a project provides a CMake-generated `compile_commands.json` (often via a symlink). ### Plugins _No response_ ### OpenCode version 1.1.26 ### Steps to reproduce 1. open C++ project 2. ask agent to work on an issue 3. when agents tries to use clangd LSP, they get an bogus error messages like missing std::string ### Screenshot and/or share link _No response_ ### Operating System _No response_ ### Terminal _No response_
yindo added the bug label 2026-02-16 18:05:29 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 19, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #7780: LSP support for choosing between multiple build directories (c++ / clangd)
  • #3598: sometimes clangd lsp hangs
  • #1985: clangd: disabled: true in the config doesn't disable clangd
  • #7405: How to configure LSP? (reports clangd errors like file not found)
  • #9102: Agents misinterpret LSP diagnostics as failed edits

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 19, 2026): This issue might be a duplicate of existing issues. Please check: - #7780: LSP support for choosing between multiple build directories (c++ / clangd) - #3598: sometimes clangd lsp hangs - #1985: clangd: disabled: true in the config doesn't disable clangd - #7405: How to configure LSP? (reports clangd errors like file not found) - #9102: Agents misinterpret LSP diagnostics as failed edits Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#6871