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.
| Moment | Antigravity CLI |
|---|---|
| Hook types |
|
| Session and workspace | |
| Session starts | SessionStartadd context Runs before the first model invocation of a new conversation. Can inject steps. |
| Prompt and turn | |
| Agent finishes its turn | Stopqueue follow-up Can request continuation of the loop, with an optional reason injected as context. |
| Tools | |
| Before a tool runs | PreToolUsedecide, block Matches tool names. Can return a decision such as ask or deny before execution. |
| After a tool runs (any result) | |
| Model and provider | |
| Before a provider request | |
| After a provider response | PostInvocationadd 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.
- Google Antigravity lifecycle hooks, Documentation, checked 2026-11-22
- Antigravity CLI 1.5.14 hook validation fixture, live observation, checked 2026-11-22
- Antigravity plugin packaging, Documentation, checked 2026-11-22
- Antigravity customization discovery, Documentation, checked 2026-11-22