Skip to main content

Module hook

Module hook 

Source
Expand description

Hook doorbells: the session’s own hook process picks the letter up.

Every provider CLI runs hooks inside the open session. m4a-inbox is the hook command; this adapter only queues the letter in the session’s inbox when such a hook is installed (armed) or running (live):

FlavorHookTurn startsConsumer name
claude-rewakeClaude Stop/SessionStart with asyncRewake: true running m4a-inbox waitimmediately, idle session (exit 2 wakes Claude)live claude-rewake
claude-stopClaude Stop running m4a-inbox drain --format claude-stopat the end of the current turn (decision: block)armed stop-claude-stop
codex-stopCodex Stop hook, same JSONend of current turnarmed stop-codex-stop
kimi-stopKimi [[hooks]] event = "Stop", exit 2 + stderrend of current turnarmed stop-kimi-stop
cursor-stopCursor stop hook, followup_messageend of current turn (auto-submitted)armed stop-cursor-stop
grok-stopGrok Build Stop hook (Claude-compatible JSON)end of current turnarmed stop-grok-stop

A Stop-hook doorbell cannot start a turn in an idle session; it is the fallback after the in-session primary. The letter stays durable in the inbox either way.

Structs§

InboxHookAdapter
Queues a letter for a hook that is installed in the open session.
InboxQueueAdapter
Last link of every local chain: keep the letter durable in the inbox even when no consumer is present, so the next hook run or channel start delivers it. Reported as WakeOutcome::Queued.

Enums§

HookFlavor
Which hook drains the inbox.