github / github/copilot-cli

LSP server initialization failure reported as timeout

Offen
#3,413 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
area:tools
Vorherrschende Sprache
Shell
Sterne
11.2k
Forks
1.9k
Ø Merge
14 Std. 16 Min.
Gemergte PRs (30 T.)
6

Beschreibung

### Describe the bug

In some cases, when an LSP server fails to initialize, the logs report the error as a timeout, instead of the real process launch failure. For example this session failed to launch the server due to a configuration error, but is reported as the following:
```
2026-04-22T20:45:35.358Z [ERROR] LSP csharp server for /testbed: failed to start, cleaning up: Error: LSP csharp server for /testbed:: Server initialize timed out after 60000ms. The language server may need more time for initial project analysis. Server exited with code 1.
```

This leads a copilot to believe the server timed out, and missed the real process initialization failure:
Image

The debug logs do capture the actual error, but that is not surfaced.
```
2026-04-22T20:44:35.521Z [DEBUG] LSP csharp server for /testbed: [stderr] Could not execute because the specified command or file was not found.
```

Additionally, the `lsp test ` command doesn't seem to really test the server - it seems to report success if the process can launch (for example run using a trampoline like dnx), even if it fails seconds later due to an error. Ideally the /lsp test would actually verify that the `initialize` / `initialized` request / responses are successful.

### Affected version

v1.0.51-1

### Steps to reproduce the behavior

Create an LSP server that fails seconds after launching the process.

### Expected behavior

Copilot receives the actual server launch error, not a timeout unless the server actually times out.

`lsp test ` actually attempts verifies an LSP server can be initialized.

### Additional context

_No response_

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Start at the `lsp test ` entry point and the LSP server initialization and timeout handling described in the issue. Reproduce a server that exits after launch, compare the debug stderr with the reported error, and verify that initialization succeeds or that the actual launch failure is surfaced instead of a timeout.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Bereich
cli, devtools
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
48/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.