Native application / Grok Bot Desktop

Grok Bot Desktop: Sand coordinator singletons, Firecracker VMs and host-held MCP OAuth

Static teardown of Grok Bot 0.79.2 (com.anysphere.sand): singleton coordinatorPort, 661 aiserver.v1.* ConnectRPCs, Routines/Triggers, and VM-isolated MCP OAuth.

Contract model · conceptual sequence, not a claim about internal deployment
  1. Singleton coordinatorPort + ConnectRPC
  2. Bots, Routines and Triggers
  3. Firecracker VM + host-held OAuth
01 / EMPIRICAL RECORD

Investigation question

How does the macOS Grok Bot client (com.anysphere.sand) wire its renderer, node-agent-coordinator, Firecracker cloud VMs, Tailscale private networking, and remote MCP connectors—and why does claiming window.coordinatorPort break a live session?

02 / EMPIRICAL RECORD

Observed

Zero-execution static analysis of Grok Bot.app (v0.79.2, bundle ID com.anysphere.sand, signed by Anysphere Incorporated, 692 bundle entries including Grok Bot Computer Use.app / CUGrokBotService, Rust sand-webauthn-signer, and sand-op-launcher) paired with 53 cookie-free docs.x.ai/grok-bot and x-subscription pages maps the entire Sand client-and-cloud contract. Across 6 preload bridges (437 window.desktop.main RPCs, 31 desktopMount RPCs, sandPopout, and window.coordinatorPort), window.coordinatorPort.claim(listener) is a destructive singleton closure over sand:coordinator-port-request connected to the 227-RPC node-agent-coordinator, which in turn speaks 7 aiserver.v1.* ConnectRPC services (661 RPCs, 2,922 Protobuf descriptors). Local sand-client-persistence LevelDB caches enforce strict LRU bounds (200 entries, 786,432 chars, 7 days, 24 replicas) with sessionId, cloudAgentPeerIds, precedingTimestampMs, and unreadAnchor. In the cloud runtime, Primary (SetGrokBotMainAgent), personal, and Shared Team Bots (Owner/Manager/Collaborator) run inside per-user Firecracker microVMs (*.*.cursorvm.com) with Routines (<= 50/bot, >= 5 min interval, 300/hr account cap), Triggers (@bot on X, Bearer webhooks, Slack, local Apple Messages worker, and a draft-only mail.grokbot.com routine outbound gate), 3 Tailscale private-network paths, and server-side MCP connector execution that keeps OAuth tokens off the guest VM.

03 / EMPIRICAL RECORD

Inferred

Two architectural lessons stand out for harness builders: (1) because window.coordinatorPort.claim replaces the active MessagePort listener rather than multiplexing observers, attaching CDP to call claim() on a live Grok Bot window steals the renderer’s coordinator stream—making Enterprise Shadow-Mode Inference Hooks, bot-side webhook push, or offline LevelDB inspection the only non-destructive transcript read paths; and (2) executing remote HTTP/SSE MCP connectors on the host/server control plane while exposing tool results into *.*.cursorvm.com prevents prompt-injected code inside the Firecracker guest VM from exfiltrating third-party OAuth tokens.

04 / METHODOLOGICAL BOUNDARY

Unknown & limitations

Grok Bot was never launched, attached via CDP, or signed into (user_data_allowed: false, target_execution_allowed: false); Electron EnableNodeCliInspectArguments fuse state was separated cleanly from renderer CDP without live probing. Server-side aiserver.v1.* backend code, Dune/Firecracker hypervisor images, and live X @bot dispatch queues remain outside client and public documentation evidence.

05 / EMPIRICAL RECORD

Architecture

Grok Bot (com.anysphere.sand, Electron 41.2.1) layers: (1) 6 preload contextBridges (window.desktop.main 437 RPCs, desktopMount 31 RPCs, singleton window.coordinatorPort.claim, sandPopout) and sand-client-persistence LRU cache; (2) local node-agent-coordinator (227 RPCs) plus native helpers (CUGrokBotService 44-dylib computer-use daemon, Rust sand-webauthn-signer, and sand-op-launcher enforcing 1Password >= 8.12.42 / op >= 2.35.0 + dual codesign OU checks); and (3) 7 aiserver.v1.* ConnectRPC cloud services orchestrating shared per-user Firecracker microVMs (*.*.cursorvm.com).

06 / EMPIRICAL RECORD

Domain & data models

Domain entities span Primary Bot (Clank coordinator via SetGrokBotMainAgent), personal Memory-driven Bots, Shared Team Bots (Owner / Manager / Collaborator), Teach-mode Skills (<= 10 min recording), Routines (<= 50/bot, 20-run history, >= 5 min cadence, 200/hr routine & 300/hr account caps), SandSetupManifestEntry (30 min setup timeout, Check Script, Team Secrets <= 100 / <= 96 KB), and ZodMini custom HTTP/SSE/STDIO MCP definitions.

07 / EMPIRICAL RECORD

Workflows & state machines

Outbound safety and private-network workflows enforce explicit gates: (1) mail.grokbot.com routine runs are gated to draft-only email creation rather than unattended external sends, while Vault credential autofill separates Stripe Link / BeginGrokBotSpendApproval spend flows and hardware sand-webauthn-signer ceremonies; and (2) private corporate reachability supports Team Setup TS_AUTHKEY, native 0.79.2 TeamTailnet RPCs with SHA-256 Company CA pinning, and claimEgressTunnel (guarded against RFC1918 spoofing) alongside an explicit Apply to MCP servers network allowlist toggle.

08 / EMPIRICAL RECORD

API & protocol surfaces

437 window.desktop.main Electron IPC methods, 31 desktopMount methods, 227 node-agent-coordinator RPCs (getAgentTranscriptTail, listGrokBotTeamAgents, CheckHttpMcpStatus), and 7 aiserver.v1.* ConnectRPC services (661 RPCs / 2,922 Protobuf descriptors), plus inbound Bearer <token> webhook triggers and Enterprise Shadow-Mode Inference Hooks.