VS Code
The codai extension for VS Code mirrors your GitHub Copilot Chat sessions to your watch, phone and desktop, so you can approve tools and answer questions from anywhere. Plus @codai in chat.
The codai extension (dragoscv.codai-vscode) shares the GitHub Copilot Chat sessions you work in with your codai account. They show up on your Wear OS watch, in the Android app and in the desktop app like any other shared session. When Copilot's agent waits for you — "Allow run_in_terminal?" or a question with options — the ask reaches every device, and your answer is applied in VS Code.
Works on VS Code 1.95+ (stable and Insiders), Windows, macOS and Linux. Cursor, Windsurf, VSCodium and Trae run part of it — see Compatibility. The extension follows VS Code's display language (English or Romanian).
Install
- Marketplace: search for codai (extension id
dragoscv.codai-vscode) in the Extensions view, or runcode --install-extension dragoscv.codai-vscode(code-insidersfor Insiders). - VSIX: download the newest package from the Marketplace download link and use Extensions → … → Install from VSIX.
- Open VSX: not published yet. The release pipeline is ready and publishes the same package under the same id as soon as the Open VSX namespace is set up. Until then, use the VSIX in editors that read Open VSX.
Other editors (Cursor, Windsurf, VSCodium, Trae)
These editors install extensions from Open VSX, so codai does not show up in their search yet. Install it by hand:
- Download the
.vsixwith the Marketplace download link above. Save it with the.vsixextension. - In the editor, open the Command Palette and run Extensions: Install from VSIX…, then pick the file. From a terminal:
cursor --install-extension codai-vscode.vsix,windsurf --install-extension codai-vscode.vsixorcodium --install-extension codai-vscode.vsix. - Run codai: Sign in.
What changes outside VS Code:
- The editor must be based on VS Code 1.95 or newer; older builds refuse the package.
- The extension mirrors GitHub Copilot Chat sessions. Editors without Copilot Chat have nothing to mirror from there. In Cursor, the extension can show Cursor's own chats on your devices, read-only: you can follow them but not answer from another device.
- Continue with GitHub needs the editor's built-in GitHub sign-in. If it fails, use Sign in in the browser or an API key.
- Updates do not arrive on their own: install the new
.vsixthe same way.
Sign in
Run codai: Sign in from the Command Palette and pick Continue with GitHub, Sign in in the browser or Use an API key…. With the browser option, auth.codai.ro/device opens with the code already filled in (it is also copied to the clipboard); approve it. VS Code never sees your password — it receives its own codai_ key, kept in VS Code's secret storage and listed as a device in hub.codai.ro → Security → Devices.
Continue with GitHub (also codai: Sign in with GitHub) uses the GitHub account VS Code is already signed in to: no browser round trip, and it lands on the same codai account as signing in with GitHub on the web. A brand-new account still goes through the browser once, to accept the Terms.
Use an API key… accepts a key you created yourself. Problems signing in: see troubleshooting.
Use codai models in Copilot Chat
codai: Add codai models to Copilot Chat puts codai in the Copilot Chat model picker. It downloads the codai provider entry from https://ai.codai.ro/vscode/chatLanguageModels.json and adds it to your user chatLanguageModels.json (or updates it if it is already there), keeping every other provider. Before the first change the existing file is copied to chatLanguageModels.json.bak-codai.
Your key is never written to that file: the first time you pick a codai model, VS Code asks for your codai key once and keeps it in the OS keychain. After a sign-in in VS Code or Insiders the extension offers this command once; you can run it any time from the Command Palette.
What your devices see
| In Copilot Chat | On the watch / phone / desktop |
|---|---|
| The chat title (or your first prompt) | The session title |
| Each prompt you send | A user line |
| Each finished tool call | A tool line (tool name and its one-line description) |
| A tool waiting for confirmation | An ask: Allow / Deny |
| A question carousel | An ask with the offered options, or a free answer |
| The final answer of a request | The assistant line |
| A failed or cancelled request | An error line |
The status bar shows codai N (sessions shared) and a bell with a count when something waits for you. Click it for the list, Sync now, the log and Sign out.
Answering from another device
- Allow / Deny on a tool ask confirms or skips the tool in that chat. VS Code applies a confirmation only to a chat that is open in a window, so with
codai.remote.revealSessions(on by default) the extension opens the chat for you first. - Answer a question with one of the options, its number, or free text (dictated on the watch). Every question of a carousel is shared and gets its own answer;
(skip)leaves one for Copilot to treat as skipped. - Send a new prompt to the session and it is submitted in that chat.
- Stop cancels the running request.
Answers reach VS Code within a few seconds (codai.sessions.pollSeconds).
New asks can take a minute or two to reach your watch. VS Code writes chat sessions to disk on its own schedule, and the extension reads them from there. Answers in the other direction are fast.
Pending prompts
The Pending prompts view in the activity bar lists the prompts saved for later on any of your devices, and updates live when one changes elsewhere.
- Open in chat, Copy, Snooze, Mark done, Dismiss, Delete, and Save selection as pending prompt for new ones.
- Detected automatically. Paste a pending prompt into Copilot Chat in any VS Code window and it is marked sent, then answered when the response finishes. Nothing to click.
- Verify prompt / Verify all prompts ask codai whether the chat really did the job, using the chat and the repository diff since the prompt was sent. You get a short report (what changed, what is still missing); a complete job is marked verified.
@codai in chat
Type @codai in Copilot Chat to talk to the codai model directly (streamed, billed to your codai account).
@codai /sessions— your shared sessions on every device, with what waits for you.@codai /asks— only the open questions and approvals.
Web search and deep research in agent mode
From version 0.7.0 the extension adds three tools to Copilot agent mode, available to every model (including custom endpoints and BYOK models that have no built-in web search):
codai_web_search(#codaiWebSearch) — verified web search: each result was fetched by codai and its snippet found on the page, cited as[S1]..[Sn]. The agent can restrict sites (include_domains/exclude_domains), ask for recent pages (freshnessday/week/month/year,published_after/published_before), godeepfor hard questions or get a longer verified excerpt per result (content_chars). Language and market are inferred from the query unless the agent setslang/country.codai_web_fetch(#codaiWebFetch) — reads a public URL as clean markdown (up to 40,000 characters, 8,000 by default);focusreturns only the relevant paragraphs. The page text is marked as untrusted content.codai_deep_research(#codaiDeepResearch) — plans several searches, reads the best pages and returns a report where every claim cites its source. If the report is not ready within the wait window, the tool returns a job id and the agent calls it again withjob_id.
They are the same tools, with the same schemas and output, as on desktop, phone, the headless CLI and the hosted MCP (one contract). They use your codai key (sign in first) and the API endpoints POST /v1/tools/search, POST /v1/tools/fetch and POST /v1/research. A refusal by one of your rules, a bad argument or a rate limit is shown to the model as an ERROR line and never silently retried. Searches and fetches are metered (pricing): the first 1,000 calls a month are free, and calls are free when codai is the chat model. Enable or disable them in the chat Tools picker, or reference them in a prompt with #.
Sessions from other devices (experimental, Insiders)
With codai.experimental.chatSessionsProvider on, VS Code Insiders lists the sessions that run on your other codai devices in its own Sessions view. Opening one shows its history; a prompt typed there is sent to the device running it. This uses a proposed VS Code API, so start Insiders with --enable-proposed-api dragoscv.codai-vscode (or add "enable-proposed-api": ["dragoscv.codai-vscode"] to argv.json via Preferences: Configure Runtime Arguments). Without that, the setting does nothing.
Compatibility
The extension needs VS Code 1.95 or newer. Some features use APIs that only VS Code itself provides; in other editors (and in VS Code versions without those APIs) the extension shows a one-time notice listing what is unavailable, and everything else keeps working.
| Editor | Install from | Works | Does not work |
|---|---|---|---|
| VS Code / VS Code Insiders | Visual Studio Marketplace | Everything | — |
| Cursor | Open VSX (dragoscv.codai-vscode) once published there; until then the VSIX from the GitHub release | Pending prompts, Transcripts, sign-in, status bar | Copilot session mirroring, @codai in chat, agent tools |
| Windsurf | Same as Cursor | Pending prompts, Transcripts, sign-in, status bar | Copilot session mirroring, @codai in chat, agent tools |
| VSCodium | Same as Cursor | Pending prompts, Transcripts, sign-in, status bar | Copilot session mirroring, @codai in chat, agent tools |
| Trae | Same as Cursor | Pending prompts, Transcripts, sign-in, status bar | Copilot session mirroring, @codai in chat, agent tools |
Why:
- Copilot session mirroring reads the chat files that GitHub Copilot Chat stores inside VS Code, so it works only in VS Code Stable and Insiders.
@codaiin chat needs the chat participant API (vscode.chat.createChatParticipant).- Agent tools (
#codaiWebSearch, the Studio tools, …) needvscode.lm.registerTool.
A fork that does provide the chat or tool APIs gets those features; the notice lists only what is actually missing. codai: Add codai models to Copilot Chat is offered only in VS Code and Insiders.
Settings
| Setting | Default | Meaning |
|---|---|---|
codai.sessions.mirror | true | Share this window's Copilot Chat sessions. Set it per workspace to keep one project private. |
codai.sessions.activeMinutes | 120 | Only sessions changed in the last N minutes are shared. |
codai.sessions.mirrorAllWorkspaces | true | One VS Code window per machine also shares the chats of every other workspace. |
codai.sessions.terminalAgents | true | Also share Copilot CLI, Claude Code and Codex CLI sessions started in a terminal, and Cursor chats, read-only. Needs codai.sessions.mirrorAllWorkspaces. |
codai.sessions.maxSessions | 40 | Maximum sessions shared per source per poll. |
codai.sessions.stubLimit | 200 | Older chats are listed on your phone and in the hub by title only, up to this many; opening one loads it. 0 = only active chats. |
codai.sessions.askTimeoutMinutes | 0 | Answer a question still open after N minutes with its recommended option. 0 = wait for you. |
codai.sessions.backfillRequests | 3 | Past requests shown when a session is first shared. |
codai.sessions.pollSeconds | 5 | How often the extension checks for changes and remote answers. |
codai.remote.revealSessions | true | Open the chat when an approval arrives from another device. |
codai.experimental.chatSessionsProvider | false | Sessions from other devices in the Sessions view (Insiders + proposed API). |
codai.prompts.autoCapture | true | Save handoff prompts (a text block in an answer that mentions a new chat) to Pending prompts. |
codai.prompts.autoDetect | true | Mark a pending prompt sent / answered when you use it in Copilot Chat. |
codai.prompts.scanAllWorkspaces | true | Look in the chats of every VS Code window on this machine, not only this one. |
codai.gatewayUrl / codai.authUrl | https://ai.codai.ro / https://auth.codai.ro | Only change these for a self-hosted codai. |
codai.telemetry | false | Send crash reports (opt-in; only while VS Code telemetry is also on). |
codai.osGate.enabled | true | Check this computer's minimum security protections and warn in the status bar when they are off. Runs locally; nothing is sent. |
Privacy
The extension only reads the chat session files VS Code already keeps (workspaceStorage/<id>/chatSessions/, and for Copilot CLI chats in newer Insiders builds globalStorage/agent-host.db plus ~/.copilot/session-state/<id>/events.jsonl, read from a private copy); it never modifies them. It sends to ai.codai.ro: the session title, your prompts without attached context, tool names and their one-line descriptions, the final answer text, and asks. It does not send file contents, attachments, tool results or edits. Each VS Code session maps to one codai session keyed vscode:<machine>:<session id>; delete it from the hub or any app like any other session. See the privacy policy.
Titles and assistant text that arrive from your other devices are escaped before VS Code shows them, so they cannot inject links or commands, and remote images in mirrored answers are removed. Crash reports are opt-in (codai.telemetry); see crash reports.
Troubleshooting
| Symptom | Fix |
|---|---|
| Status bar shows codai with a slashed circle | Not signed in — click it. |
| A session does not appear on the watch | It must have changed within codai.sessions.activeMinutes, and VS Code must have saved it (send one more message, or wait a minute). codai: Sync sessions now forces a read. |
| An approval from the watch did nothing | The chat was closed and codai.remote.revealSessions is off — open the chat, or turn the setting on. |
| Another device runs the same session | Only one device executes a session (the lease). The extension retries every minute; see the log (codai: Shared sessions… → Show log). |
Last updated:
Control an iPhone remotely
See an iPhone's screen live and drive it from the hub, the Android app or any codai agent, through the codai iPhone bridge — no jailbreak, same account only.
codaid CLI
Install the codaid command-line client on Linux or Windows, sign in, keep it up to date and know where to go for environments.