Skip to main content
failproofai --hook <EventType>
This is the command registered in Claude Code’s settings.json by failproofai policies --install. You don’t normally call this directly. Reads a JSON payload from stdin, evaluates all enabled policies, and exits with a code indicating the decision:
Exit codeDecisionEffect
0allowPermit the action
1denyBlock the action - Claude sees the denial reason
2instructInject guidance into Claude’s context

Supported event types

CategoryEvents
Tool executionPreToolUse, PostToolUse, PostToolUseFailure, PermissionRequest, PermissionDenied
Session lifecycleSessionStart, SessionEnd, Stop, StopFailure
User interactionUserPromptSubmit, Notification, Elicitation, ElicitationResult
Subagents & tasksSubagentStart, SubagentStop, TaskCreated, TaskCompleted, TeammateIdle
ConfigurationInstructionsLoaded, ConfigChange, CwdChanged
File systemFileChanged, WorktreeCreate, WorktreeRemove
ContextPreCompact, PostCompact