How Infa CLI configures Claude Code hooks during automated runs to report progress back to the cloud.
During automated local and remote / cloud runs, Infa CLI automatically configures Claude Code hooks. These hooks report activity back to Supabase in real time, so the Infa web UI can show live progress as Claude works.
Interactive sessions (infa session start) do not use hooks.
Copy link
What are hooks?
Claude Code hooks are HTTP or shell callbacks that fire on specific events during a session. Infa writes them to .claude/settings.local.json in the target repo before spawning Claude. The file is automatically deleted when the session ends.
Hooks & Agents
During automated local and remote / cloud runs, Infa CLI automatically configures Claude Code hooks. These hooks report activity back to Supabase in real time, so the Infa web UI can show live progress as Claude works.
Interactive sessions (
infa session start) do not use hooks.Claude Code hooks are HTTP or shell callbacks that fire on specific events during a session. Infa writes them to
.claude/settings.local.jsonin the target repo before spawning Claude. The file is automatically deleted when the session ends.Infa writes three hook types:
PostToolUse(Edit|Write|MultiEdit|Bash)StopSessionEndcurlClaude is also spawned with these environment variables:
INFA_RUN_IDINFA_RUN_TOKENINFA_PAPER_IDThese are available inside Claude sessions — for example, a custom agent prompt can reference
$INFA_RUN_ID.All hooks point to the
run-hookSupabase Edge Function. This function:runstable (status,session_url, etc.)https://claude.ai/...)Hooks are automatically removed when the session ends:
If a session crashes before cleanup, the file is left on disk and will be overwritten the next time a run starts on the same repo.