codai docs
Apps

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.105+ (stable and Insiders), Windows, macOS and Linux.

Install

  • Marketplace: search for codai by dragoscv in the Extensions view, or run code --install-extension dragoscv.codai-vscode (code-insiders for Insiders).
  • VSIX: download codai-<version>.vsix from the release and use Extensions → … → Install from VSIX.

Sign in

Run codai: Sign in from the Command Palette. Your browser opens auth.codai.ro/device 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.

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.

Alternatively, codai: Use an API key… accepts a key you created yourself.

What your devices see

In Copilot ChatOn the watch / phone / desktop
The chat title (or your first prompt)The session title
Each prompt you sendA user line
Each finished tool callA tool line (tool name and its one-line description)
A tool waiting for confirmationAn ask: Allow / Deny
A question carouselAn ask with the offered options, or a free answer
The final answer of a requestThe assistant line
A failed or cancelled requestAn 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). Only the first question of a carousel takes your answer; the others keep their defaults.
  • 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 (freshness day/week/month/year, published_after / published_before), go deep for hard questions or get a longer verified excerpt per result (content_chars). Language and market are inferred from the query unless the agent sets lang / country.
  • codai_web_fetch (#codaiWebFetch) — reads a public URL as clean markdown (up to 40,000 characters, 8,000 by default); focus returns 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 with job_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.

Settings

SettingDefaultMeaning
codai.sessions.mirrortrueShare this window's Copilot Chat sessions. Set it per workspace to keep one project private.
codai.sessions.activeMinutes120Only sessions changed in the last N minutes are shared.
codai.sessions.backfillRequests3Past requests shown when a session is first shared.
codai.sessions.pollSeconds5How often the extension checks for changes and remote answers.
codai.remote.revealSessionstrueOpen the chat when an approval arrives from another device.
codai.experimental.chatSessionsProviderfalseSessions from other devices in the Sessions view (Insiders + proposed API).
codai.prompts.autoCapturetrueSave handoff prompts (a text block in an answer that mentions a new chat) to Pending prompts.
codai.prompts.autoDetecttrueMark a pending prompt sent / answered when you use it in Copilot Chat.
codai.prompts.scanAllWorkspacestrueLook in the chats of every VS Code window on this machine, not only this one.
codai.gatewayUrl / codai.authUrlhttps://ai.codai.ro / https://auth.codai.roOnly change these for a self-hosted codai.

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.

Troubleshooting

SymptomFix
Status bar shows codai with a slashed circleNot signed in — click it.
A session does not appear on the watchIt 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 nothingThe chat was closed and codai.remote.revealSessions is off — open the chat, or turn the setting on.
Another device runs the same sessionOnly one device executes a session (the lease). The extension retries every minute; see the log (codai: Shared sessions… → Show log).

Last updated:

On this page