Skip to content
Agentic Control Plane

Antigravity hooks with ACP: force_ask, fail-closed, and what --dangerously-skip-permissions turns off

David Crowe David Crowe · · 5 min read
antigravity google coding-agents agentic-control-plane plugin-launch
Share X HN LinkedIn

Google Antigravity now runs ACP. The agy CLI replaced Gemini CLI in May, and the ecosystem got an enterprise tier in August. One installer command puts an ACP hook on it. Every tool call across the CLI, the IDE and the app is checked against your workspace policy before it runs, recorded, and summed up in a session receipt. The hook is one Node file on GitHub, MIT, no dependencies.

Building it taught us one thing no other harness offers and two things you have to design around. The hook docs are public. What they leave out, we checked on the shipped 1.1.21 binary, as of 2026-08-26.

force_ask: a hook that can hand a call to the human

Most harness hooks answer allow or deny. Claude Code’s can also answer ask. Antigravity’s PreToolUse hook answers with five words: allow, deny, ask, force_ask, deny_unless_prior_grant. force_ask prompts the person every time and ignores cached “Always Allow” grants. For an outside policy layer that is the primitive you want. No remembered local grant can wave through a call that policy said to hold.

What ACP does with it today is narrower. The gateway only sends a hold as a prompt to a harness where someone has watched a human answer it, and today that is Claude Code. On Antigravity a held call shows up as a block, with the reason. You approve it on the Approvals page or from the approval email, then ask the agent to retry. The hook already maps an ACP ask to force_ask; the gateway will start sending one once we have watched that card render and get answered in a live session. As of this post, that is still pending.

Headless (agy -p) there is no prompt to render. Antigravity soft-denies an ask nobody can answer: the run continues, exits 0, and stderr names the tool. An empty chair resolves to no without our hook doing anything special.

Fail-closed hooks: the right default, with a sharp edge

Antigravity is the first mainstream harness we have checked whose hook core fails closed. If a pre-tool hook crashes, times out or exits non-zero, the call does not run. The binary’s own error string is pre-tool hook failed. Claude Code’s hooks fail open by default (an onFailure: "block" option exists from 2.1.295), and Grok Build’s fail open. On those, a broken policy hook is a silent allow.

Fail-closed moves the burden onto the hook. A hook that crashes during a gateway outage blocks every tool call in the session. So ours never exits non-zero and never lets an exception escape; every outcome goes back as JSON with exit 0. When the gateway cannot be reached, the hook decides for itself. In an interactive session the call proceeds with a loud [ACP] UNGOVERNED warning and a line in ~/.acp/lapse.log. On the background or subagent tier the call stays blocked. Antigravity’s payload has no permission-mode field, so the tier comes from agent_tier in ~/.acp/config.json (or background when CI is set) and defaults to interactive. Pin it on CI runners.

Three contract details that bite a naive port

All three are spelled out on the control-model page.

  • The payload doesn’t name its event. There is no hookEventName field. The registration passes the event as a command-line argument instead. A Claude-shaped hook that switches on the payload’s event name misroutes everything, silently.
  • PostToolUse can’t see tool output. The payload carries the call and an error string, not what the tool returned. You cannot scan output from the hook alone, so our post event is an audit and completion record. The transcript file the payload points at has the full exchange; the hook doesn’t read it today.
  • The hook environment is sanitized. Most env vars never reach the subshell. Configuration lives in ~/.acp/config.json.

--dangerously-skip-permissions removes the hooks too

The docs don’t say this. An A/B on two otherwise identical headless turns settled it. Without the flag the hook fires, before the permission layer. With the flag, zero hook invocations: no check, no lapse line, no record. Claude Code’s deny rules and hooks survive its bypass flag. Grok Build fires deny rules and PreToolUse hooks in always-approve mode. Antigravity removes the hooks themselves. If you run an unattended fleet, alert on that flag, and unblock headless runs with scoped permissions.allow rules instead.

The rest of the live pass checked the happy paths: run_command puts its command string in CommandLine; the always-on safety floor blocked rm -rf / under the native tool name; headless soft-deny and the session receipt behaved as documented.

What Google’s own controls cover, and where they stop

Antigravity ships a good permissions engine, a sandbox, and an enterprise tier with central audit logging, MCP restrictions and spend caps. If your whole fleet is Antigravity on an enterprise license, use them. Most fleets aren’t. They are Claude Code plus Codex plus Cursor plus whatever shipped last week, and each vendor’s admin plane covers its own harness only. ACP gives all of them one set of rules, one approval queue and one log.

Install

curl -sf https://agenticcontrolplane.com/install.sh | bash

The installer detects Antigravity (the agy binary or an existing ~/.gemini/antigravity-cli profile), drops the hook at ~/.acp/hooks/antigravity/hook.mjs, and merges its registration into the shared ~/.gemini/config/hooks.json under an acp key, leaving your other hooks alone. The next session is checked.

Three things before you run it. A new workspace starts in audit mode: calls are recorded, the safety floor holds the dangerous ones for approval, and your own rules start blocking once you turn on enforce from the Policies page. --local mode skips Antigravity; this hook needs a workspace. And there is no cost metering: Antigravity’s model endpoint can’t be redirected, so the hook covers tool calls only. Manual steps and the full contract: the install guide.

Running Antigravity? One command adds a hook. Each tool call it sees is recorded, and a force-push, destructive SQL or curl | sh is blocked until you approve it on the console or from the email.

macOS · Linux · WSL
curl -fsSL https://agenticcontrolplane.com/install.sh | bash
Windows · PowerShell
irm https://agenticcontrolplane.com/install.ps1 | iex

What the installer writes  ·  Antigravity guide  ·  free up to 5 agents

Share X HN LinkedIn
Get the next data drop
What agents actually cost, new tool-surface captures, and the occasional incident post-mortem — sent when we publish something worth your inbox, not on a schedule. Unsubscribe anytime.
Share: Twitter LinkedIn
Related posts

← back to blog