Harness Notes

Hooks

Updated 2026-11-24,

On this page

Which moments a hook can attach to, and what it can do there. Event names link to each harness’s documentation. “Block”, “deny” and “modify” change what the agent does; “observe only” can watch but not intervene. Where hook files live is on the Locations page.

MomentAntigravity CLI
Hook types
  • command
Session and workspace
Session starts
SessionStart

add context

Runs before the first model invocation of a new conversation. Can inject steps.

Prompt and turn
Agent finishes its turn
Stop

queue follow-up

Can request continuation of the loop, with an optional reason injected as context.

Tools
Before a tool runs
PreToolUse

decide, block

Matches tool names. Can return a decision such as ask or deny before execution.

After a tool runs (any result)
PostToolUse

observe only

Matches tool names. The documented output is an empty JSON object.

Model and provider
Before a provider request
PreInvocation

add context

Can inject transient context before a model invocation.

After a provider response
PostInvocation

add context, stop, queue follow-up

Can inject steps and direct the loop to continue or terminate.

Notes and sources

Antigravity CLI
  • The 1.5.14 plugin validator recognized a group containing the six documented events. Hook dispatch and effects were not runtime-tested.