Grok Build for VS Code

The AFK Pilot extension (previously Grok Build for VS Code) is a free community project that runs the Grok Build coding agent inside VS Code, Cursor, and Google's Antigravity editor. Instead of the terminal UI, you get sidebar chat, native diff previews, permission cards, parallel sessions, and a live model picker with Grok 4.7. The official CLI stays the engine. The extension is the interface. In VS Code and Cursor, the same sidebar also runs Meta's Muse Code, DeepSeek (through DeepSeek Harness), OpenAI Codex, Claude Code and Google's Antigravity agent.

I built it and maintain it, along with AFK Pilot's phone remote and Cloud machines at afkpilot.com. AFK Pilot and Grok Build Desktop (Community) are unofficial community projects, not affiliated with or endorsed by SpaceXAI (formerly xAI), Meta, DeepSeek, OpenAI, Anthropic or Google.

Grok Build running Grok 4.5 in the VS Code sidebar, in an earlier version of the AFK Pilot extension

Install from VS Code Marketplace

See in Open VSX Registry

At a Glance

Last updated: November 22, 2026. Extension v4.17.5; 180,000+ installs.

AFK Pilot extension at a glance: six coding agents in one chat in VS Code and Cursor, with a phone remote and Cloud machines

Grok, Grok Build, AFK Pilot: Which Is Which

People mix these up, so a short disambiguation. Grok 4.7 is the model (SpaceXAI’s flagship for code since September 21, 2026, and what Grok Build starts on). Grok Build is the CLI coding agent that plans, edits files, runs commands, and uses MCP servers. AFK Pilot is this extension: a GUI for that agent, and for five other coding agents, inside your editor. The extension needs the Grok Build CLI to run Grok, and installs it for you.

The extension was listed as Grok Build for VS Code (Community) until September 2026 and as GUI for Grok Build & Muse Code until October 2026, when it became AFK Pilot. Its ID, grok-vscode-phuryn, never changed, so searching it in Extensions always finds it. AFK Pilot also names the phone remote and AFK Pilot Cloud; the standalone app is still called Grok Build Desktop (Community).

What It Does

The core loop:

  • Sidebar chat with streaming responses and optional reasoning traces

  • Native diff previews before any file edit is approved

  • Permission cards for writes and shell commands in Agent mode

  • Plan Mode that blocks workspace writes until you approve the plan

  • Auto accept mode with an expandable audit trail when you want speed. A new install starts Grok Build in it; switch to Agent in the bottom toolbar to approve each step

Native diff preview and permission card for a Grok Build edit in the AFK Pilot extension

Sessions:

  • Multiple sessions in parallel with background execution

  • Agent dashboard with status dots (working, awaiting input, unread results)

  • Searchable history of the last 30 days, with resume and rename; older conversations stay on disk

  • Worktree sessions that run in an isolated copy of the repo, plus Rewind to step a conversation back to an earlier point

  • Fork a conversation, edit an earlier prompt or branch from a reply into a new chat, and queue or steer a running turn without killing it

  • Desk alerts: a toast in VS Code when a turn finishes, fails or waits for you while you look elsewhere, with Approve once for a short, plain shell command

Parallel Grok Build agent sessions with status dots in the history dropdown

Projects:

  • The projects rail: every project and its recent conversations side by side, under its own Projects icon in the activity bar

  • Projects are the folders you chose: the one VS Code has open and any you add, create or clone. Recent (what you sent in or recently opened, across every folder) and pinned conversations sit above them; a project idle for a month files itself under Archived and comes back the moment you work in it

  • Open or start a conversation in any project without switching your VS Code window; per-project colors sync to the phone client

  • Add project offers three ways in: name a new one and it lands in ~/AFK Pilot, import a folder, or clone from GitHub by picking a repository or pasting a URL. GitHub is a connection under Settings → Providers, by the GitHub CLI or a fine-grained token the extension never stores

Context:

  • @file chips from the Explorer or drag and drop, Alt+G for the active file

  • Vision input: paste or attach screenshots and images up to 20 MiB

  • Voice dictation with live transcription, through your Grok sign-in, an OpenAI API key or a Gemini API key (on xAI, roughly $0.10 to $0.20 per hour)

Models and cost:

  • Live model switching, Grok 4.7, 4.6 and 4.5 included. API-key users also get the wider grok-4.x family and grok-imagine

  • Reasoning effort control; the levels follow the model, low to xhigh on Grok 4.7

  • Context-token donut and /compact for long sessions; Grok 4.7's context window is a dropdown, 256K or 500K

  • Compact at a token limit: choose 200K to 750K once in Settings, and every agent compacts by that point, except Antigravity, which keeps its own schedule

  • Meta's Muse Code (Muse Wonder), DeepSeek (DeepSeek V4 Pro and V4.1 Flash 1017, through DeepSeek Harness), OpenAI Codex (GPT-6.2 Sol), Claude Code (Opus 5.5) and Google's Antigravity through its agy CLI (Gemini models such as Gemini 4 Neon and Argon, plus Claude and GPT-OSS models with a Google sign-in) connect as extra providers and share the same model picker. Each conversation keeps the agent it started with

Output:

  • /imagine and /imagine-video render inline

  • LaTeX via MathJax, Mermaid diagrams rendered offline and theme-aware

Plumbing:

  • MCP servers: whatever the CLI is configured with, the extension uses

  • Slash commands autocomplete in the composer, sourced live from the CLI

  • 70+ settings, from grok.defaultModel to grok.chatFontScale

  • Built-in remote control: watch, approve and steer from a phone, browse the project’s files, and open, edit and save a text file remotely, whether the agent runs on your computer or on an AFK Pilot Cloud machine

  • Routines: a prompt scheduled against a project, set from the desk or the phone

  • Connectors: Linear, Notion, GitHub and others as agent tools; the GitHub connector takes a fine-grained token

Install in Five Minutes

  1. Open Extensions (Ctrl/Cmd+Shift+X) in VS Code, Cursor or another VS Code-based editor.

  2. Search “AFK Pilot” or the ID grok-vscode-phuryn, and install. Or skip the search with the direct links below.

  3. Press Ctrl/Cmd+; to open the sidebar.

  4. The setup wizard installs the grok CLI if needed and signs you in. Any X or Grok account works to try it, with usage limits; SuperGrok, X Premium+, or an xAI API key for sustained use.

Install: VS Code Marketplace · Open VSX Registry · Source: GitHub

If your goal is specifically the new model, the short version lives here: How to Use Grok 4.7 in VS Code.

Privacy

No message content, no code, no file paths, and no account identity leave your machine through the extension, except through features you turn on. Voice dictation sends audio to SpaceXAI, OpenAI or Google for transcription, and the optional simplified read-aloud summaries and thumbs feedback on Grok replies go to SpaceXAI. With a linked phone, prompts, replies and the files you open remotely pass through the AFK Pilot relay in memory, over TLS on both hops, and are never stored (not end-to-end encrypted). Your prompts go where they always go: each agent sends them to its own vendor, so Grok Build's go through the official Grok CLI to SpaceXAI. The extension adds only anonymous, opt-out usage telemetry (grok.telemetry.enabled: false turns it off, and VS Code’s global telemetry setting is respected).

How It Compares

Terminal launchers open the same TUI in a split pane. This extension replaces the TUI with native editor UI. Generic Grok chat extensions answer questions about code via the API but don’t run the agent, so no autonomous edits and no diffs. Zed and T3 Code are full ACP clients for the same CLI in their own right. The full landscape: Does Grok Build have a GUI? Of these, this extension runs Grok Build, Muse Code, DeepSeek, Codex, Claude Code and Google's Antigravity agent side by side in the same editor UI.

If you do not want an editor in the picture at all, the same agent ships as a standalone app: Grok Build Desktop (Community), free for Windows, macOS and Linux.

FAQ

Is there an official xAI VS Code extension? No. SpaceXAI (formerly xAI) does not publish a first-party VS Code extension. It ships the Grok Build CLI, which is itself open source (github.com/xai-org/grok-build), a terminal UI, and the Agent Client Protocol for third-party interfaces. This extension is an independent community project built on that protocol.

Is it free? The extension is free to install and open source (FSL-1.1-MIT; each release becomes MIT after two years). The agent underneath is free to try with usage limits on any X or Grok account; sustained use needs SuperGrok, X Premium+, or an xAI API key.

What’s the difference between the Grok Build CLI and this extension? The CLI is the agent: sessions, memory, models, MCP, tool execution. The extension is the interface: chat, diffs, approvals, session UI. The extension requires the CLI and installs it for you.

Does it work with Codex and Claude Code? Yes. The extension speaks the Agent Client Protocol rather than anything Grok-specific, so the same chat, diffs, permission cards and history drive OpenAI Codex and Claude Code as well. Connect them under Settings → Providers; each signs in through its own CLI, from the desk or from the phone (Codex from the phone needs device-code login allowed on your OpenAI account). All of them run side by side and every conversation keeps the agent it started with. Grok Build is the default and the one this is built and tested against. The picker shows Codex's models, such as GPT-6.2 Sol, and Claude Code's default reads “Default (Opus 5.5)”; Claude Code starts new conversations in its own Auto mode. Both have Plan mode, take a Steer mid-turn, and can edit an earlier prompt or branch from a reply into a new chat; Codex also offers Ask for approval, which keeps it in its sandbox and asks before it acts outside. To keep Claude Code running with your laptop shut, see Claude Code on a VPS.

Does it work with Muse Code? Yes. Since v4.11 (September 2026) Meta's Muse Code runs here too, and it is the second agent the AFK Pilot listing names: Grok Build and Muse Code are the two agents with no graphical interface of their own. Muse speaks Meta's own protocol rather than ACP, so the extension ships a small adapter for it. Connect it under Settings → Providers; if the CLI is missing, the panel offers Meta's installer. The model picker shows whatever Muse's CLI offers your account, such as Muse Wonder, and Muse Wonder Full for Muse Code subscribers. Muse keeps its own approval modes: Allow all, Prompt unmatched, and, on your own macOS or Linux computer, On request. Full detail: Muse Code GUI.

Does AFK Pilot run DeepSeek Harness? Yes. Since v4.15.7 (November 2026) DeepSeek runs here through DeepSeek's own official harness, DeepSeek Harness (dsh), not a re-implementation. Connect it in Settings → Providers with a DeepSeek API key, at the computer or from a linked phone; the extension installs a pinned copy of dsh with its own Node, leaves your global Node alone, and keeps the key in its secure storage. Before the first message, pick the harness in the context popup: Default, dsh's standard agent, which is built to ask before the actions dsh flags (in my tests on Windows it never asked, and its shell commands there run without dsh's sandbox), or Minimal, a lean tool set with full access and no approval prompts. What a generic ACP client doesn't give you: in Default, typing / offers /goal and its siblings plus the skills dsh loads from your project and ~/.agents/skills, and hands-free voice works too: dictate, say "grok send" (or your own phrase) to send, and hear the replies, with your Grok sign-in, an OpenAI API key or a Gemini API key. The picker offers DeepSeek's models, such as DeepSeek V4 Pro and V4.1 Flash 1017. It runs in VS Code, Cursor and the desktop app, and on Cloud machines. The limits: there is no plan mode, compaction on demand or image attachments, though it compacts at the token limit you set; and after a restart, a reopened DeepSeek conversation keeps its context but does not show its earlier messages. Setup in detail: DeepSeek Harness in VS Code. The same model in DeepSeek Harness, Claude Code and other harnesses, measured: DeepSeek Harness vs Claude Code.

Does it work with Cursor and Antigravity? Yes, as editors. VS Code 1.106+ and Cursor 3.x run it; other VS Code-based editors such as Google's Antigravity editor install it from Open VSX, and may hold you on the last version compatible with their VS Code base. Antigravity is also the name of Google's coding agent, which the extension runs too, through Google's agy CLI: connect it in Settings → Providers with a Google account or a Gemini API key, and the extension installs the CLI. It has Plan mode and Steer, and a usage meter with a Google sign-in; there are no connectors yet. Phone routes for each editor: Cursor remote control and Antigravity remote control.

How is this different from Kilo Code? Kilo Code is a multi-provider agent extension that can call Grok models through the API, alongside other providers. This extension is the GUI for the official Grok Build CLI: the agent loop, the memory, the MCP servers, and your SuperGrok or X Premium+ plan are the official stack, and the interface is the only community part. Both reach more than one provider now; the difference is that Kilo Code calls models over an API, while this runs the vendors' own CLI agents.

Can I use this without VS Code? Yes, but not this extension. Grok Build Desktop (Community) is a separate standalone app for Windows, macOS and Linux that runs the same agent with no editor installed. It is free, and it shares conversation history with the extension under ~/.grok. Full detail: Grok Build Desktop.

Is it safe to use on a real codebase? In Agent mode, file edits and shell commands show a permission card before they run, and Plan Mode gates work behind an approved plan. A new install starts Grok Build and Antigravity in Auto accept and Muse in Allow all, which approve actions for you, so pick Agent (for Muse, Prompt unmatched) in the bottom toolbar if you want to approve each step. The source is public if you want to check what the extension itself does.

Does it support Grok 4.7? Yes. Grok 4.7 is what a fresh install starts on, and the model picker switches live, so Grok 4.6 and 4.5 stay one click away. Setup guide: How to Use Grok 4.7 in VS Code.

Can I use it from my phone? Yes. Remote control is built in: pair your phone once at afkpilot.com and watch, approve and steer from any browser, including browsing the project’s files and editing text files. Setup: Grok Remote Control. The same session can also live on an AFK Pilot Cloud machine, a dedicated Linux box with Grok Build, Muse Code, Codex and Claude Code preinstalled and Antigravity and DeepSeek one install away, if you would rather not keep a computer on.

Where do I report bugs? GitHub issues on the repo.


I build this extension in the open and write up what it teaches me. The newsletter is the other half: what changes about product work once agents do the building.