Repository navigation
Closed
Labels
Milestone
Description
Refs: #342120
- macOS Elijah King (@eli-w-king)
- windows Vijay Upadya (@vijayupadya)
- linux Alex Ross (@alexr00)
Complexity: 3
Authors: Karthik Nadig (@karthiknadig)
/code-insiders in the Copilot CLI hands the current session to VS Code Insiders. The CLI exits, and the session opens in the Chat view of its folder's window, with its history, model and modes.
Setup
- VS Code Insiders with chat: open Copilot CLI sessions from product protocol links #342120, signed in to Copilot.
- Copilot CLI 1.0.106-7 or later:
npm install -g @github/copilot@prerelease. In the CLI, run/settings experimental trueonce. - A git repository folder. Run
copilotin an external terminal, not VS Code's.
Steps
- Quit VS Code Insiders. Run
copilotin the folder. Pick a non-default model and effort with/model, switch to plan mode (Shift+Tab), run/allow-all, and send a message. - Run
/code-insiders. If it lists settings that can't carry over, confirm. The CLI says it's opening the session in VS Code Insiders Chat, showscopilot --resume=<id>, and exits. Accept VS Code's prompt to open the folder. - Check that the Chat view shows the session's history, with Plan, Allow all, and the CLI's model and effort selected. Send a message: the conversation continues.
- Repeat steps 1–3 with Insiders already running. With the folder open, that window is focused. Without it, a new window opens and other windows are left alone.
- Quit Insiders. Run
copilot --resume=<id>, send a message, and leave the CLI running. Openvscode-insiders://file/<folder>?windowId=_blank&copilotCliSession=<id>(Start-Process "<link>"in PowerShell,open "<link>"on macOS,xdg-open "<link>"on Linux). VS Code warns that the session is open in another process. Cancel opens nothing; open the link again and Open Anyway opens it. Then exit the CLI.
Known limitations
- Windows opened on a
.code-workspacefile aren't targeted. - If you go back to the CLI and run
/codeagain while Insiders is still running, Insiders shows its earlier copy of the session, without the new CLI turns. - Permissions given only when the CLI was launched (
--allow-all-tools,--allow-tool,/add-dir) and session approvals don't carry over./codelists them before handing off.
Activity