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 sets VSCODE_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_CLI to determine the variant
(the path typically contains "insiders" for code-insiders)
- Check for
code-insiders / code in PATH order
- Respect
$VISUAL / $EDITOR environment 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.
Describe the bug
When pressing CTRL+Y to view the plan, copilot spawns
codeunconditionallyon Linux when
VSCODE_IPC_HOOK_CLIorWSL_DISTRO_NAMEis set. This failsfor users who have VS Code Insiders (
code-insiders) but not regular VS Code.The error:
The issue is in the file-opening logic which hardcodes
"code"as thecommand 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
(which sets
VSCODE_IPC_HOOK_CLI)Expected behavior
Copilot should detect the correct VS Code variant. Possible approaches:
VSCODE_IPC_HOOK_CLIto determine the variant(the path typically contains "insiders" for code-insiders)
code-insiders/codein PATH order$VISUAL/$EDITORenvironment variablesxdg-openWorkaround
Create a symlink:
ln -s "$(which code-insiders)" ~/.local/bin/codeAdditional context
Related to #1038 (same underlying function), but a different failure mode.