-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
Description
Describe the bug
When pressing CTRL+Y to view the plan, copilot spawns code unconditionally
on Linux when VSCODE_IPC_HOOK_CLI or WSL_DISTRO_NAME is set. This fails
for users who have VS Code Insiders (code-insiders) but not regular VS Code.
The error:
✗ 'code' is not available. You can open the file manually at
/home/user/.copilot/session-state/<id>/plan.md
The issue is in the file-opening logic which hardcodes "code" as the
command for Linux+WSL/VS Code environments, without accounting for
code-insiders, code-exploration, or other variants.
Affected version
0.0.412-0
Steps to reproduce the behavior
- Install VS Code Insiders (but not regular VS Code) on WSL
- Open copilot-cli from the VS Code Insiders integrated terminal
(which setsVSCODE_IPC_HOOK_CLI) - Start a session that produces a plan
- Press CTRL+Y to view the plan
Expected behavior
Copilot should detect the correct VS Code variant. Possible approaches:
- Parse
VSCODE_IPC_HOOK_CLIto determine the variant
(the path typically contains "insiders" for code-insiders) - Check for
code-insiders/codein PATH order - Respect
$VISUAL/$EDITORenvironment variables - Fall back to
xdg-open
Workaround
Create a symlink: ln -s "$(which code-insiders)" ~/.local/bin/code
Additional context
Related to #1038 (same underlying function), but a different failure mode.
Reactions are currently unavailable