DEV Community

Cover image for Choosing Between --hub and Built-in ACP in Antigravity CLI 1.5.5
El
El

Posted on Originally published at 2bab.me

Choosing Between --hub and Built-in ACP in Antigravity CLI 1.5.5

Update (2026-11-17): Raft's Antigravity runtime now runs on the official OAR (Open Agent Runtime), which talks to agy acp directly. Just use OAR. raft-acp-bridge is archived after serving its purpose. The comparison and benchmarks below are kept for reference.

I recently switched the Antigravity ACP backend in raft-acp-bridge (see commit da834bc). Instead of driving standalone ACP server 1.1.1, Raft now connects to the agy acp subcommand built into Antigravity CLI. I verified this on 1.5.5, and 1.5.1 or newer is recommended for new installs.

With this change, installing and signing in to Antigravity CLI is all you need locally. You can drop the separate agy_acp_server.par and its companion localharness_external binary, which used to take up around 872 MiB on disk for the entry-point files alone. In day-to-day Raft use, three things get noticeably better. If your account has Claude access, Claude models show up right in Raft's model picker. You can send follow-up instructions mid-turn (steering) instead of queuing them locally in memory until the current turn finishes. And conversations survive bridge restarts.

This is the third post in my Antigravity integration series, following earlier pieces on three ways to invoke agy externally and reusing Grok Build to bring Antigravity and Maka into Raft. This change started almost by accident. Friends in our GDE group mentioned that Google's official Antigravity extension for VS Code felt pretty smooth. Around the same time, I asked an agent in Raft to polish three short paragraphs on a card and waited 11 minutes for a reply. That delay later turned out to be a system prompt and harness issue, but at the time it got me wondering: how does the VS Code extension wire up Antigravity under the hood, and would going the same route make things faster? We unpacked the extension bundle, saw that it runs on agy --hub, and built a temporary adapter to test both paths side by side.

How the VS Code Extension Connects to Antigravity

We took a look inside the official Google.google-antigravity Marketplace package (1.11.0; see the official VS Code docs for setup details) to check its process layout. It doesn't use ACP at all. Instead, it spawns a local agy --hub process, passes the open workspace folders via --add-dir, and loads hub's chat UI inside a sidebar Webview. The Webview connects to hub over a local WebSocket at /connect-websocket to send RPC calls and subscribe to a continuous stream of agent state updates. On the editor side, the VS Code Extension Host exchanges postMessage calls with the Webview to open files, render diffs, and run background health checks. It also keeps the Webview context alive when the sidebar is hidden, so collapsing and reopening the panel doesn't lose UI state.

By contrast, Antigravity's ACP interface is far leaner. The client spawns agy acp as a child process, exchanges JSON-RPC messages over stdio, and receives text chunks, tool calls, and permission prompts scoped to each session. Putting both architectures side by side makes the structural difference clear:

Architecture comparison between the official VS Code extension (agy --hub) and the Raft bridge (agy acp)

As shown above, the two paths are built for very different host environments:

  • Editor context sync: When you highlight a few lines in VS Code, the extension watches the editor and sends the active file, selection range, and even unsaved buffer text directly to the chat UI. In a standalone group-chat app like Raft, if you just type "help me rewrite the second paragraph," the agent first has to search the directory to find the draft and figure out which paragraph you mean. How much editor context the model actually uses, and how many file reads it saves, still depends on the task.
  • Bridge maintenance cost: Raft's GrokDriver already speaks ACP, so raft-acp-bridge only needs to translate handshake details, model prefixes, and a handful of extension calls while passing most session messages straight through. Switching to agy --hub would force the bridge to maintain a WebSocket state-stream client and reassemble low-level step updates into the turns and events Raft expects. Since hub's internal RPC has no public stability guarantee, every CLI update would require re-checking message shapes by hand.

Polishing the Same Three Paragraphs: How Big Is the Latency Gap?

Since we already had a hub test client ready, we ran a controlled benchmark to see whether --hub was inherently faster than standalone ACP server 1.1.1, which we were using at the time. Both setups used the same account and the same gemini-4-argon-medium model. Every run started a fresh process and session in an isolated directory, alternating between ACP -> hub and hub -> ACP order:

  • Pure text polishing: We placed the three Chinese paragraphs, roughly 300 characters total, straight into the prompt, disabled tools, and asked only for the polished text back (0 tool calls, 1 model request per run).
  • Fixed file read-write workflow: The prompt told the agent to read the source text from a file with one command, polish it, and use a second command to write the result back and verify paragraph count and length (2 tool calls, 3 model requests per run).

We ran 6 pairs for each task, 24 runs in total, timing from when the prompt went out until both the reply text and the turn-completion signal arrived. For pure text polishing, median latency was 11.79s on the old standalone ACP server versus 9.21s on hub, and hub finished faster in 5 of the 6 pairs. Once file reads and writes entered the picture, though, ACP posted a median of 29.65s compared to hub's 32.23s, winning 4 of the 6 pairs. In the slowest file-workflow pair, the two took 42.82s and 67.25s respectively, and one hub request spent roughly 47s just waiting for the first token (timeToFirstToken).

One caveat: these numbers compared standalone ACP server 1.1.1 against --hub on CLI 1.5.3, driven directly by a WebSocket test script rather than the full VS Code UI. The two backends also differed in their default context and tool policies. When we later compared built-in agy acp and --hub on the same CLI build, we focused on feature parity and didn't re-run these latency tests. Even so, the takeaway is clear: a two- or three-second gap between integration paths doesn't come close to explaining an 11-minute wait. What actually drags down small tasks is the agent turning a local edit into dozens of tool calls and model round-trips. The only fix is to tune the prompt and cut down on redundant re-exports. Swapping the underlying transport makes no difference.

Why We Still Chose Built-in ACP After Getting --hub Working

As we noted in the second post, the old standalone agy_acp_server.par didn't support mid-turn steering. Sending a second concurrent session/prompt threw an error, so the bridge had to hold follow-up messages in a local queue. To see if --hub could fill that gap, we wired up a hub prototype behind the grok entry point. File reads and edits, one-time permission prompts, model switching, and resuming after a restart all worked. Even when we dropped the WebSocket mid-task and re-subscribed, the running command still finished normally.

Mid-turn steering, however, ran into a classic state-attribution problem. In hub, injecting a follow-up instruction and canceling the running command are two separate operations. In one test run, we asked the agent to execute a ~24s command and sent a new instruction partway through. The model picked up the new goal right away and replied in about 15s, while the old 24s command kept running in the background. Once that old command finished, hub appended its output to the trajectory and triggered another model generation, producing a second, nearly identical reply. Because those two replies came from two separate planning steps rather than duplicate WebSocket frames, simple frame deduplication wouldn't catch them. For Raft, the bridge would have to track which step each piece of text and late tool result belonged to, decide when to close the open turn, and issue separate cancellation requests whenever the user clicked stop.

Right as we were weighing whether to build out that state machine, we checked the Antigravity CLI release notes and spotted two timely updates. CLI 1.5.0 added a built-in agy acp subcommand with native support for steering an active session via a second concurrent session/prompt, along with session/resume for recovery. Right after that, 1.5.1 opened up every model available on the account to ACP clients. Both --hub and agy acp now launch from the same ~199 MiB Antigravity CLI binary, so you no longer need the old standalone server and its companion binaries.

That made the changes in raft-acp-bridge's src/shim.js session adapter much cleaner:

  • Mid-turn steering: When Raft sends _x.ai/interject while an agent is busy, the bridge issues another session/prompt to the same agy acp session and holds back the active turn's completion response until all pending prompts settle.
  • Session recovery: The bridge maps Raft's session/load to session/resume. We didn't forward session/load directly because, in our 1.5.3 tests, sending a random nonexistent ID to session/load still succeeded with no history replayed. That would trick Raft into thinking a missing session was still alive. Calling session/resume explicitly returns a read error instead, so the bridge can translate it into "session not found" and let Raft start a fresh session.

We switched to CLI 1.5.5 for a full verification pass, and the whole flow checked out. After setting a secret passphrase on Gemini and switching mid-session to Claude, Claude recalled it accurately. Restarting the bridge and resuming via session/resume preserved the passphrase too, and canceling a streaming turn left the session clean for the next prompt. Sending follow-up messages mid-turn in Raft also steered the agent onto the new direction right away. In one run where we interjected after reply text had already started streaming, though, it still took around 34s from sending the new message until the turn fully wrapped up.

Overall, if you're building a rich editor UI like the VS Code extension, hub's state-stream subscriptions, background task controls, and editor hooks are well worth studying. For a host like Raft that already has its own chat and tool UI, built-in agy acp covers the session operations we need with far fewer moving parts. For daily use, stick with GROK_SHIM_PROFILE=agy, as covered in the setup and upgrade guide. If you're upgrading from the old standalone ACP server, remember to rescan runtimes in Raft and restart the corresponding agent. For some older sessions left over from that setup, just start a fresh conversation.

Top comments (0)