Chock.sh Build your plugin

Agents

Grok CLI

Grok CLI and chock: install methods and steps, what it can enforce, and the evidence behind it.

Install methods: plugin, sync. Agentseam tier block, grade best-effort before a tool runs.

Install methods

  • Plugin: chock install --client grok (ask the user before running it)
  • Repo hooks: chock sync --repo . --agents grok writes .grok/hooks/agentseam.json (ask the user before running it)

Install steps

Grok (grok)

Tested

The command (ask the user before running it: it builds a plugin of hooks that change how their agent behaves):

chock install --selection <code> --client grok --apply

With --apply, chock runs these steps for Grok:

  1. grok plugin install ~/.chock/marketplace/grok/chock-guardrails --trust

Plugins are off in grok until enabled, and chock does not edit grok's config: run grok plugin list for the name grok gave this plugin (chock expects chock-guardrails, its folder name; the docs do not say how a plugin with no plugin.json is named), then grok plugin enable <name>, or add it to enabled under [plugins] in ~/.grok/config.toml, or press Space on it in the Plugins tab. Re-run the install command after a rebuild.

What it can enforce

Tier
block
Grade before a tool runs
best-effort
Fail mode before a tool runs
open
Basis
vendor-docs
Recorded
2026-08-26

Events

EventCan blockCan rewriteFail mode
pre_toolyesnoopen
post_toolnonoopen
tool_failurenonoopen
prompt_submitnonoopen
session_startnonoopen
session_endnonoopen
subagent_startnonoopen
subagent_stopnonoopen
stopnonoopen
pre_compactnonoopen

Ask support

Answers an ask with: deny. Honours ask: no. Evidence: tested (tests/test_guard_fail_to_ask.py::test_a_crashed_guard_asks_rather_than_allowing).

Hook timeout

Default 5 seconds, set by the timeout field in s.

Vendor source

Test status

  • Plugin (grok): tested.
  • Repo hooks: untested. A test of the plugin says nothing about repo hooks.
  • Through the plugin install, at hook point plugin-hook: Grok Build 1.0.62, Windows 11, 2026-10-17. live probe of a chock plugin installed with grok plugin install --trust (no hook trust prompt). It was enabled under the name Grok generated, c--users-<user>--chock-marketplace-grok-chock-witness-481da8d4 (username redacted as <user>), instead of chock-witness. block-no-verify refused a git commit --no-verify shell command before it ran ("run_terminal_command blocked by plugin/c--users-<user>--chock-marketplace-grok-chock-witness-481da8d4/hooks: Blocked by chock policy: block-no-verify"). pin-github-actions is advisory on Grok and the workflow write landed, as labelled, so no gate refusal is claimed (org-plan witness/results/witness-grok-2026-10-17.md, f52c055)

Known limits

PreToolUse is the ONLY blocking event; everywhere else stdout is ignored. No rewrite: the vocabulary is {decision: deny, reason} and nothing more. Fails OPEN -- timeouts, crashes and malformed output are recorded and the call proceeds. Payload fields are camelCase (hookEventName, toolName) while event values stay PascalCase, which is what separates it from Claude Code, Codex and VS Code Copilot. Reads .claude/settings.json, .claude/settings.local.json and .cursor/hooks.json too, by default, and runs their hooks as its own, collapsing only a hook identical in event, command and matcher (xai-org/grok-build@2bdd1d6 discovery.rs, read 2026-10-13); so uninstall grok leaves agentseam hooks those files carry, and doctor names each one that does. Project hooks need trust (/hooks-trust or --trust) before they run, so a written config is not yet a live one. Grok Build (2026-10-11): this row IS xAI's Grok Build (the grok binary, https://github.com/xai-org/grok-build), not a separate product; its hooks page https://docs.x.ai/build/features/hooks (last updated 2026-07-02) matches this row's contract, xAI names no rename, and grok_build therefore gets no row of its own. The row predates Grok Build 1.0.13 and is stale against the vendor's newer user guide (https://github.com/xai-org/grok-build/blob/main/crates/codegen/xai-grok-pager/docs/user-guide/10-hooks.md, read 2026-10-11 against changelog v1.0.50 of 2026-10-06, https://x.ai/changelog/build): hookEventName now carries snake_case values (pre_tool_use) beside a hook_event_name key with the PascalCase name, payloads add timestamp, permissionMode, promptId and toolUseId, tool names are grok's own (run_terminal_command, search_replace), PreToolUse also takes ask, defer and hookSpecificOutput.updatedInput, and UserPromptSubmit, Stop and SubagentStop accept decision: block. Measured 2026-10-11: a payload shaped like the guide's example was claimed by vscode_copilot, not grok. Since value-based detection (D1) it detects as grok and parses to pre_tool: hookEventName being the snake_case twin of hook_event_name is what separates it, and grok's adapter reads the event from hook_event_name, so the {decision: deny, reason} answer this row records reaches a current build's PreToolUse. Not confirmed on a live build, and not widened here: grok's own tool names (run_terminal_command, search_replace) are in no tool list, so shell and write policies do not see those calls as shell or write; ask, defer and updatedInput stay unclaimed; PostToolUse output arrives as toolResult, which the adapter does not read. The capabilities above are left as recorded until a live run settles the shape. Instruction files reach it through AGENTS.md (D2a, 2026-10-11): xAI's project-rules page (https://docs.x.ai/build/features/project-rules, titled AGENTS.md, last updated 2026-07-04, read 2026-10-11) says Grok Build reads AGENTS.md, Agents.md, AGENT.md, CLAUDE.md, Claude.md and CLAUDE.local.md in every directory from the repo root down, plus .grok/rules/*.md; the .grok/GROK.md file agentseam used to write came from the community superagent-ai/grok-cli and is not on that list. Evidence wanted (to test or overturn this row): https://github.com/open-coder-ai/agentseam/issues/188

Built from engine 5a4b6287a46e and catalog 1e60d211c1bb.