Feature: first-class Grok Build CLI agent in Copilot Chat (SuperGrok `grok login`, not API-key-only)
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
> **Note:** `microsoft/vscode-copilot-chat` is archived (issues now filed here per [repo README](https://github.com/microsoft/vscode-copilot-chat)).
### Summary
VS Code integrates **GitHub Copilot CLI** as a first-class agent in Copilot Chat / Agents view, with session monitoring, remote control, and approvals reflected in both terminal and chat ([Copilot CLI in VS Code](https://code.visualstudio.com/docs/copilot/agents/copilot-cli)).
**xAI Grok Build** is a separate official coding agent (`grok` CLI) with its own sessions, tools, MCP, skills, and ACP surface (`grok agent stdio`). There is **no equivalent first-class integration** in Copilot Chat. Users on **SuperGrok** who authenticate via `grok login` cannot use that subscription-backed agent inside Copilot Chat without workarounds that either spawn a non-integrated terminal session, proxy chat models through third-party OAuth bridges, or fall back to metered **`XAI_API_KEY`** billing.
I am asking for **native Grok Build CLI support in Copilot Chat**, analogous to Copilot CLI, using the existing CLI OAuth session rather than API credits.
### Motivation
I want one agent UX in VS Code:
- Start / resume Grok Build from **Copilot Chat** or **Agents**
- Monitor and approve tool runs from chat while the agent runs locally
- Switch between terminal and chat on the **same session** (same model as [copilot-cli#3639](https://github.com/github/copilot-cli/issues/3639))
- Bill against **SuperGrok** (`~/.grok/auth.json`, OIDC via `auth.x.ai`), **not** prepaid API credits
Copilot Chat already exposes **Grok chat models** (e.g. `grok-code-fast-1`) via **GitHub Copilot**. That is not Grok Build: no shared session with `grok` in the terminal, no Grok MCP/skills/plugins stack, no `~/.grok/sessions/` continuity, no ACP tool/permission parity.
### Proposed direction
Treat **Grok Build CLI** as an external ACP agent provider, similar to Copilot CLI integration:
1. **Discovery** — detect `grok` on PATH (`~/.grok/bin/grok` or user setting)
2. **Auth** — use existing CLI session (`grok login`); “Sign in to Grok” when `~/.grok/auth.json` is missing/expired. **Primary path: SuperGrok subscription, not `XAI_API_KEY`.**
3. **Lifecycle** — e.g. `Chat: New Grok Build Session`: spawn `grok agent stdio` or attach to user-started `grok` / terminal session; `session/new` / `session/load` for workspace cwd
4. **Chat UI** — stream ACP `session/update` (messages, thoughts, tools, permissions)
5. **Permissions** — Grok permission requests in chat; responses over ACP
6. **Session list** — list/resume from `~/.grok/sessions/` (align with `grok sessions list` / `grok --resume`)
7. **Remote control** — parity with Copilot CLI: terminal ↔ chat on the same session
xAI’s documented IDE path is **ACP**; Zed and other editors already host Grok Build as an external ACP agent. Copilot Chat would be a native ACP client host.
### Authentication constraints
| Path | Support |
|------|---------|
| `grok login` → **SuperGrok** / X Premium+ | **Primary** |
| Enterprise OIDC / SSO | Yes |
| `XAI_API_KEY` | Optional fallback (CI/headless), not default UX |
Voice STT and other API-only xAI products can stay separate; the **coding agent** should not force API-key billing for subscribers.
### Out of scope
- Not a request for more Grok **chat models** in the Copilot model picker (already available via GitHub).
- **Is** a request for the **Grok Build agent** in Copilot Chat’s agent framework, on subscription auth.
- Community sidebar ([grok-build-vscode](https://github.com/phuryn/grok-build-vscode)) and OAuth proxies are workarounds, not substitutes for Copilot Chat integration.
### Acceptance criteria
- [ ] SuperGrok user with only `grok login` (no API key) can start Grok Build from Copilot Chat
- [ ] Tool calls, edits, and shell commands appear in chat with approve/deny
- [ ] Sessions persist under `~/.grok/sessions/` and are resumable from Chat
- [ ] Documented coexistence with Copilot CLI (separate providers)
- [ ] Optional: remote control between integrated terminal `grok` and Chat (same session)
### References
- [Build with agents in VS Code](https://code.visualstudio.com/docs/agents/overview)
- [Copilot CLI sessions in VS Code](https://code.visualstudio.com/docs/copilot/agents/copilot-cli)
- [copilot-cli#3639](https://github.com/github/copilot-cli/issues/3639)
- [xAI Grok Build / ACP](https://docs.x.ai/build/overview)
- Community ACP client: [phuryn/grok-build-vscode](https://github.com/phuryn/grok-build-vscode)
- Related Community feature request: [phuryn/grok-build-vscode#50](https://github.com/phuryn/grok-build-vscode/issues/50) (attach terminal session to sidebar)
### Environment
| Item | Value |
|------|--------|
| OS | WSL2 (Ubuntu) on Windows — kernel `6.18.33.2-microsoft-standard-WSL2` |
| VS Code | **Insiders 1.130.0-insider** (commit `a07fb2914c`, 2026-07-14) — **Remote-WSL** |
| GitHub Copilot Chat | **Built into VS Code Insiders** (`builtInExtensionsEnabledWithAutoUpdates`: `GitHub.copilot-chat`); no separate `github.copilot-chat` folder under `~/.vscode/extensions` on this machine |
| Grok CLI | **0.2.101** (`5bc4b5dfad`) `[stable]` |
| Auth | **SuperGrok** via `grok login` — not `XAI_API_KEY` |
| Related extension | Grok Build (Community) **1.5.14** (Windows UI host) / **1.5.13** (WSL remote server) — proves ACP + subscription login works outside Copilot Chat |
### Additional context
The Community extension already runs Grok Build over ACP with `grok login`. The gap is **first-party Copilot Chat integration** so Grok Build sits alongside Copilot CLI in the same agent shell, on SuperGrok auth, with terminal ↔ chat session sync.
Contributor guide
Assessment
This issue has not been assessed yet.