Windows: Ctrl+G cannot launch code-insiders --wait
- Dominant language
- Shell
- Stars
- 11.2k
- Forks
- 1.9k
- Avg merge
- 14h 16m
- Merged PRs (30d)
- 6
Description
### Bug
On Windows, `Ctrl+G` cannot launch VS Code Insiders when `$EDITOR` is set to the standard wait command:
```powershell
$env:EDITOR = 'code-insiders --wait'
```
The same command works directly from PowerShell.
### Repro
```powershell
$env:EDITOR = 'code-insiders --wait'
code-insiders --wait # works
copilot
# Press Ctrl+G
```
### Expected
Copilot CLI opens VS Code Insiders and waits for the prompt file to close.
### Actual
```text
✗ Error: Editor 'code-insiders --wait' not found. Check your $COPILOT_EDITOR, $VISUAL, or $EDITOR environment variable.
```
Using a `.cmd` wrapper also fails with `spawn EINVAL`.
### Notes
`code-insiders` resolves to a Windows `.cmd` shim, so this appears related to #1882. The fix is likely to handle Windows `.cmd` / `.bat` editor commands through `cmd /c` or `shell: true`, and to support editor commands with arguments such as `--wait`.
### Environment
- Windows
- PowerShell
- Copilot CLI 1.0.60
- VS Code Insiders
Contributor guide
Research direction
Read the related #1882 issue and trace how the CLI resolves and spawns editor commands on Windows. Reproduce the PowerShell case with `code-insiders --wait` and the `.cmd` wrapper, then verify that the editor opens and waits for the prompt file to close without the reported errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell, shell
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 56/100