Hooks
Shell commands the agent runs at fixed points in its loop: before a tool call, after an edit, on session start. This is the enforcement layer — formatters, guards, anything you'd rather not leave to the model's judgment.
Widest support first. Hover any name for what it means.
| concept | support | Claude Code | Codex | Cursor | Fabro |
|---|---|---|---|---|---|
| PostToolUse | 4/4 | ||||
| PreToolUse | 4/4 | ||||
| command | 3/4 | — | |||
| PostToolUseFailure | 3/4 | — | |||
| PreCompact | 3/4 | — | |||
| SessionStart | 3/4 | — | |||
| Stop | 3/4 | — | |||
| SubagentStart | 3/4 | — | |||
| SubagentStop | 3/4 | — | |||
| type | 3/4 | — | |||
| allowedEnvVars | 2/4 | — | — | ||
| headers | 2/4 | — | — | ||
| matcher | 2/4 | — | — | ||
| model | 2/4 | — | — | ||
| PermissionRequest | 2/4 | — | — | ||
| PostCompact | 2/4 | — | — | ||
| prompt | 2/4 | — | — | ||
| SessionEnd | 2/4 | — | — | ||
| timeout | 2/4 | — | — | ||
| url | 2/4 | — | — | ||
| UserPromptSubmit | 2/4 | — | — | ||
| afterAgentResponse | 1/4 | — | — | — | |
| afterAgentThought | 1/4 | — | — | — | |
| afterFileEdit | 1/4 | — | — | — | |
| afterMCPExecution | 1/4 | — | — | — | |
| afterShellExecution | 1/4 | — | — | — | |
| afterTabFileEdit | 1/4 | — | — | — | |
| agent_id | 1/4 | — | — | — | |
| agent_type | 1/4 | — | — | — | |
| args | 1/4 | — | — | — | |
| async | 1/4 | — | — | — | |
| asyncRewake | 1/4 | — | — | — | |
| beforeMCPExecution | 1/4 | — | — | — | |
| beforeReadFile | 1/4 | — | — | — | |
| beforeShellExecution | 1/4 | — | — | — | |
| beforeSubmitPrompt | 1/4 | — | — | — | |
| beforeTabFileRead | 1/4 | — | — | — | |
| blocking | 1/4 | — | — | — | |
| checkpoint_saved | 1/4 | — | — | — | |
| ConfigChange | 1/4 | — | — | — | |
| cwd | 1/4 | — | — | — | |
| CwdChanged | 1/4 | — | — | — | |
| edge_selected | 1/4 | — | — | — | |
| effort | 1/4 | — | — | — | |
| Elicitation | 1/4 | — | — | — | |
| ElicitationResult | 1/4 | — | — | — | |
| event | 1/4 | — | — | — | |
| failClosed | 1/4 | — | — | — | |
| FileChanged | 1/4 | — | — | — | |
| hook_event_name | 1/4 | — | — | — | |
| if | 1/4 | — | — | — | |
| input | 1/4 | — | — | — | |
| InstructionsLoaded | 1/4 | — | — | — | |
| loop_limit | 1/4 | — | — | — | |
| max_tool_rounds | 1/4 | — | — | — | |
| MessageDisplay | 1/4 | — | — | — | |
| name | 1/4 | — | — | — | |
| Notification | 1/4 | — | — | — | |
| once | 1/4 | — | — | — | |
| parallel_complete | 1/4 | — | — | — | |
| parallel_start | 1/4 | — | — | — | |
| PermissionDenied | 1/4 | — | — | — | |
| permission_mode | 1/4 | — | — | — | |
| PostToolBatch | 1/4 | — | — | — | |
| prompt_id | 1/4 | — | — | — | |
| run_complete | 1/4 | — | — | — | |
| run_failed | 1/4 | — | — | — | |
| run_start | 1/4 | — | — | — | |
| sandbox | 1/4 | — | — | — | |
| sandbox_cleanup | 1/4 | — | — | — | |
| sandbox_ready | 1/4 | — | — | — | |
| server | 1/4 | — | — | — | |
| session_id | 1/4 | — | — | — | |
| Setup | 1/4 | — | — | — | |
| shell | 1/4 | — | — | — | |
| stage_complete | 1/4 | — | — | — | |
| stage_failed | 1/4 | — | — | — | |
| stage_retrying | 1/4 | — | — | — | |
| stage_start | 1/4 | — | — | — | |
| statusMessage | 1/4 | — | — | — | |
| StopFailure | 1/4 | — | — | — | |
| TaskCompleted | 1/4 | — | — | — | |
| TaskCreated | 1/4 | — | — | — | |
| TeammateIdle | 1/4 | — | — | — | |
| timeout_ms | 1/4 | — | — | — | |
| tls | 1/4 | — | — | — | |
| tool | 1/4 | — | — | — | |
| transcript_path | 1/4 | — | — | — | |
| UserPromptExpansion | 1/4 | — | — | — | |
| version | 1/4 | — | — | — | |
| workspaceOpen | 1/4 | — | — | — | |
| WorktreeCreate | 1/4 | — | — | — | |
| WorktreeRemove | 1/4 | — | — | — |