Grok Build Permissions: It Runs Your Claude Code Hooks and Ignores What They Say
Grok Build is xAI’s terminal coding agent (1.0 as of August 7). ACP now has a plugin for it, @agenticcontrolplane/grok-build. It checks every tool call before it runs, in every permission mode, and writes an audit record and a session receipt.
Building it turned up two things. One is a trap in how Grok Build handles Claude Code hooks. The other is a bug in our own gateway, found by the live test. We’re writing both down.
What Grok Build’s hooks do
Grok Build open-sourced in July. What follows comes from the hook runner’s source and the in-repo user guide.
PreToolUse hooks fire in every permission mode, including --always-approve. Deny rules do too. Always-approve silences Grok’s own prompts, and the hook is still on the path. Hooks register user-wide in ~/.grok/hooks/*.json with no per-project trust prompt. There’s an updatedInput field for rewriting tool input, and type:"http" hooks can post the event straight to a URL.
Two things to design around.
It fails open. The default hook timeout is 5 seconds. A hook that times out, crashes or returns something unparseable gets a log line, and the call goes ahead. Only an explicit deny blocks. A policy hook that relies on this inherits “proceed” as its failure mode.
Ours sets its own posture. The registered timeout is far above the hook’s internal 4-second budget, so Grok’s timer never decides. If the gateway can’t be reached, attended sessions fail open with a loud UNGOVERNED warning and a line in ~/.acp/lapse.log. Unattended sessions fail closed.
There is no ask. Grok reads a top-level decision field. deny blocks. allow or nothing allows. Anything else is an error. So when ACP says ask, the hook blocks the call and puts a console link in the message. You approve on the console or from the approval email, then tell Grok Build to retry. That works the same way in every mode.
The compatibility trap
Grok Build reads hooks from your real ~/.claude/settings.json by default, maps Claude tool names in matchers, and sets CLAUDE_PROJECT_DIR. If you have Claude Code hooks installed, Grok Build is already running them.
It just doesn’t read their answers. The runner doesn’t parse Claude’s hookSpecificOutput.permissionDecision. xAI’s own example emits that key “for forward-compatibility” only. Claude’s older approve and block values are errors. A Claude-style deny parses as no decision, and no decision means allow.
So the hook fires on every call, shows up in the config, and visibly runs. Every verdict it returns is thrown away. The session looks governed and isn’t.
We keep running into this kind of failure, in other harnesses too. The control isn’t missing. It’s installed and silently not applying. The fix is a hook that speaks Grok’s own vocabulary. Ours also emits Claude’s format alongside, for the day that forward-compatibility note turns into real parsing.
The bug the live test found in our gateway
Before anything ships, we test end to end against production. The first fixture was rm -rf / under Grok’s native shell tool name.
tool_name: "run_terminal_command" → allow
tool_name: "Bash" → deny (hardline floor)
Same command, same credential, same tier. Our always-block list for commands like rm -rf / looked up the canonical tool name and never checked the unmapped one. Every plugin we’d shipped before passed its live test because its harness’s tool names happened to be ones the gateway knew. Grok’s weren’t.
We filed it internally. The plugin fix came first: Grok’s native names map to canonical ones before the check, using the alias table from Grok’s own docs, and the native name rides along in the audit record as client_tool_name. The gateway has since been fixed too, with a test for Grok’s tool name. The rm -rf / fixture now denies under the native name with exit code 2, and that check lives in the plugin’s test suite.
We publish this because the failure we care about is silence. A check that quietly doesn’t apply looks exactly like one that held, right up until it matters. If your control layer never runs adversarial tests against its own production path, you don’t know which one you have.
Where Grok Build lands
On our coverage table, the hook sees everything: native tools and MCP tools (as server__tool), in every mode. An ask becomes a block you approve on the console. Results can’t be rewritten before the model reads them, because only PreToolUse blocks. Findings after the call go to the audit log.
On the controls comparison, Grok Build has one of the better always-approve stories of the harnesses we’ve read: hooks and deny rules run in every mode. The catch is that its hook core fails open. Its headless dontAsk mode is the opposite of an escape hatch: it silently denies anything without an explicit allow rule. We first listed dontAsk as the escape hatch. The source says otherwise, and the deep page now has it right.
Install
curl -sf https://agenticcontrolplane.com/install.sh | bash
The installer detects Grok Build, registers the hook user-wide and connects a workspace. Guide · source · what Grok Build ships natively
Running Grok Build? 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.
curl -fsSL https://agenticcontrolplane.com/install.sh | bash
irm https://agenticcontrolplane.com/install.ps1 | iex
What the installer writes · Grok Build guide · free up to 5 agents