Chock.sh Build your plugin

Agents

Gemini CLI

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

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

Install methods

  • Repo hooks: chock sync --repo . --agents gemini writes .gemini/settings.json (ask the user before running it)

Note

Gemini CLI is not an install target of chock: Antigravity CLI replaces Gemini CLI for unpaid users, so chock builds no Gemini CLI plugin. Use the Antigravity plugin. (Source: Chock's install command (src/chock/install/cli.py, --client gemini-cli) and agentseam's matrix notes for gemini_cli)

What it can enforce

Tier
block+rewrite
Grade before a tool runs
best-effort
Fail mode before a tool runs
open
Basis
vendor-source
Recorded
2026-08-28

Events

EventCan blockCan rewriteFail mode
pre_toolyesyesopen
post_toolyesnoopen
prompt_submityesnoopen
stopyesnoopen
session_startnonoopen
session_endnonoopen
pre_compactnonoopen

Ask support

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

Hook timeout

Default 60 seconds, set by the timeout field in ms.

Vendor source

Test status

  • Repo hooks: untested. A test of the plugin says nothing about repo hooks.
  • No row in the engine's list of live tests for this agent.

Known limits

Top-level decision: allow|deny|ask + reason (not nested); rewrite merges via hookSpecificOutput.tool_input; exit 2 also blocks. Write tools are write_file/replace. Fail mode is not documented as closed, so pre_tool is rated best-effort rather than enforced. Source (read from a clone, 2026-08-28) corrected two things the hooks reference alone had settled wrongly. ask IS honoured, at BeforeTool only: hook-utils routes isAskDecision() to PolicyDecision.ASK_USER and calls resolveConfirmation with forcedDecision:'ask_user', which prompts even where the user's own policy rule would have auto-allowed -- a stronger ask than most vendors here can express, and this adapter was degrading it to a deny. At BeforeAgent/AfterAgent only isBlockingDecision() is consulted, so an ask there is inert and the degradation is right. Conversely allow is read NOWHERE: nothing in the tree tests for it and hookAggregator synthesises it when no hook objected, so unlike VS Code's permissionDecision:allow it cannot skip a confirmation. Superseded (consumer tiers): Google's own post 'An important update: Transitioning Gemini CLI to Antigravity CLI' (https://developers.googleblog.com/an-important-update-transitioning-gemini-cli-to-antigravity-cli/, 2026-05-19) announces 'the sunsetting of Gemini CLI in favor of Antigravity CLI' and says Gemini CLI stops serving Google AI Pro, Ultra and free Code Assist users on 2026-06-18, while enterprise access 'remains unchanged'. The CLI still ships (npm @google/gemini-cli 0.63.0, 2026-10-06, not npm-deprecated), so this row stays for paid and enterprise users; new work should target the antigravity row. Install's file was checked against source (google-gemini/gemini-cli@51617c1, read 2026-10-13): hookRegistry.ts reads settings hooks as event -> [{matcher, hooks: [{type, command}]}], the shape hook_config() writes, and settingsSchema.ts gives those objects no additionalProperties: false, so settings validation passes the _agentseam marker through. Project hooks load only in a trusted folder (hookRegistry.ts: 'Project hooks disabled because the folder is not trusted'); folder trust is off by default, and where a user turns it on the folder is trusted from Gemini's trust dialog or /permissions (geminicli.com/docs/cli/trusted-folders). Not run.

Built from engine 5a4b6287a46e and catalog 1e60d211c1bb.