The moments of a turn
Hang your own code on each moment of a turn, and change what happens.
- Six moments everywhere. Session start and close, prompt, tool, message and turn end reach every CLI.
- Refused up front. A flow that needs a moment its CLI lacks is refused before the run starts.
- Part of the turn. A slow hook makes a slow turn; a hook that fails fails the turn.
- Your settings untouched. Hooks belong to the flow, and hang on its agents only while it runs.
- Stopping a tool in time. Holds from the next turn after hanging, and only while the agent works on this machine.
| Moment | CLIs that reach it |
|---|---|
| the CLI asks whether a tool may run | claude codex kimi |
| the agent asks its user | claude codex kimi omp pi |
| a subagent starts or finishes | claude codex cursor-agent mcode |
| a tool refused as it is reached for never runs | claude qwen |