Istari docs

Reference

Hook events

Hook events

ist _hook <event> receives JSON on stdin from the engine and answers on stdout. The --engine flag says which engine fired it (claude-code, codex, ollama or cursor).

EventWhen it firesWhat Istari does
session-startA new engine session starts, resumes, or is compactedCreate or reuse the Istari session, detect the ticket, inject knowledge, related work, graph hint and handover notes
user-prompt-submitYou send a promptBudget and context-pressure gate, trust and mirror words, feed verbs and alerts, memory recall, Discord messages, cost hints
pre-toolBefore any tool callWrite boundary, exfiltration block, rulebook outward gate, danger gate, pause gate, surface gate, placement nudge
post-toolAfter a tool callRegistry, budget, loop detector, confidence gate, checkpoints, snapshots, stats, graph dirtiness, activity streaming
post-tool-failureA tool call failedFeed the loop detector
permission-requestThe engine shows a permission promptAuto-answer from the trust level (interactive, supervised, autonomous, silent)
notificationThe engine needs attentionRoute the notice to Discord or Slack
stopThe engine finished respondingQuality gate for the turn
subagent-start / subagent-stopA subagent starts or endsTrack subagents so orphan guards stay accurate
task-created / task-completedAn engine task is created or doneTask lifecycle tracking
pre-compact / session-endContext is about to be lostPreserve capture opportunities (ledger nudge, memory save)
session-stop / session-stop-bgSession endsMark complete, then run learning capture, memory save and ingest in a detached background process

Feed actions handled inside the hook: open-url, spawn-pick, spawn-watch-pr, dismiss, snooze, mark-delivered, set-dnd, inject-inbox, inject-brief, inject-sources, audit-log, pause-pr, unpause-pr.