You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
CodeQL Language Server suppresses diagnostics when a QL pack is loaded
Context:
We are building a headless Python LSP client for CodeQL to automate query synthesis. We are using the CodeQL CLI version 2.20.1 (via codeql execute language-server).
Current Implementation:
Server Start:codeql execute language-server --check-errors=ON_CHANGE -v
Initialization: Standard initialize request with rootUri pointing to a workspace.
Pack Setup: We create a valid codeql-pack.yml in the workspace with dependencies: { codeql/cpp-all: "^4.3.1" } and run codeql pack install.
Pack Loading: We send textDocument/didOpen for the codeql-pack.yml file to trigger pack resolution (this successfully fixes "unresolved module" errors).
Query Opening: We send textDocument/didOpen for a .ql query file inside the pack.
The Issue:
When we do not open the codeql-pack.yml file (Pack Mode inactive), the server reports diagnostics correctly (e.g., "could not resolve module cpp" or syntax errors). However, we no other solution like qlpack.yml was working to correctly point the language server to standard library location, even with --search-path or putting the search path explicitly in initializationOptions
However, as soon as we do open the codeql-pack.yml file (Pack Mode active), the server stops reporting ALL diagnostics for subsequently opened query files.
The server does not send any workspace/configuration requests to the client.
The server does not send any client/registerCapability requests.
Providing a valid database path in initializationOptions does not resolve the issue.
The didOpen for the pack file appears to successfully load the dependencies (because the "unresolved module" error disappears), but it seems to put the diagnostic engine into a silent state.
Question:
Is there a specific LSP notification, configuration option, or initialization parameter required to re-enable continuous diagnostic reporting (--check-errors=ON_CHANGE) after a QL pack has been loaded?
Technical Context:
CodeQL CLI Version: 2.20.1 (implied from dependencies)
Transport: Stdio with JSON-RPC 2.0
OS: Windows 11
Arguments: codeql execute language-server --check-errors=ON_CHANGE -v
Hi, thanks for reporting. Does this interfere with your usage of the VSCode extension, or is it something you've observed only with your headless client? Unfortunately, we don't provide support/guarantees to uses of the language-server outside of the VSCode extension, and even then we don't have the capacity to prioritize it highly. So I can't promise a time frame for when this will get fixed.
Activity
d10c commentedon Feb 19, 2026
Hi, thanks for reporting. Does this interfere with your usage of the VSCode extension, or is it something you've observed only with your headless client? Unfortunately, we don't provide support/guarantees to uses of the language-server outside of the VSCode extension, and even then we don't have the capacity to prioritize it highly. So I can't promise a time frame for when this will get fixed.