LSPs are initialized before running the sessionStart hook
- 主要语言
- Shell
- 星标
- 11.2k
- 派生
- 1.9k
- 平均合并
- 14 小时 16 分钟
- 30 天内合并 PR
- 6
描述
### Describe the bug
I am writing a hook that will help keep my LSP install updated. However, I cannot update the LSP because copilot is launching it before running hooks. This seems out of order to me.
```
2026-05-04T23:34:50.080Z [DEBUG] LSP csharp server for Q:\source\TestConsole2: [Program] Language server initialized
...
2026-05-04T23:35:04.709Z [DEBUG] Executing hook: ./.github/hooks/scripts/session-start.ps1
```
### Affected version
GitHub Copilot CLI 1.0.41-0
### Steps to reproduce the behavior
1. Add a lsp.json
2. Configure an LSP
3. Add a hooks/copilot-hooks.json
4. Configure a session-start hook that runs a session-start.ps1
5. Add a session-start.ps1 which prints "Hello"
6. Start Copilot
7. Observe the logs
### Expected behavior
I expected that the session-start.ps1 would be complete prior to initializing LSPs.
### Additional context
_No response_
贡献指南
调研方向
Reproduce the ordering with lsp.json, hooks/copilot-hooks.json, and session-start.ps1, then compare the startup logs around LSP initialization and the session-start hook. Done means the session-start hook completes before the configured LSP is initialized.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- powershell
- 领域
- cli
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 55/100