Artifact 9b97ffb9dfb347e7d66f8213a5ae8bdc2c4341c9b8560b7de5544946744ce7cf:
- File docs/reference/hook-events.md — part of check-in [d25dc49607] at 2026-11-23 17:28:19 on branch grapevine-4 — Grapevine stage 4: conversations message each other. The send_message tool (off by default; --tools +send_message) sends a framed prompt (followUp) to another conversation by id or name, in this workspace or another found through picu_workspace, keyed fx:JOURNAL_ID:EFFECT so a replay sends nothing new. Hops derived from the inbox rows behind a request, refused over grapevine.maxHops; grapevine.wake lets a message start pic run there, which admits the waiting prompt as inbox:KEY on the conversation's model, up to grapevine.maxWakes since a person's prompt; UserPromptSubmit input gains origin; pic sessions --all; journal_id in pic_meta; fault point inbox_wake. (user: dmestas, size: 1196) [annotate] [blame] [check-ins using] [more...]
Hook events
The Claude Code hook events pic fires. How hooks are configured and what their output does is in hooks.
| Event | When | Can block |
|---|---|---|
SessionStart |
a conversation opens; output becomes context | no |
UserPromptSubmit |
before a message is sent; output becomes context; its input's origin is user, or who sent it (session:JOURNAL/CONVERSATION for another conversation, cli, attach, remote:DEVICE) |
yes |
PreToolUse |
before a tool call; permissionDecision or exit 2 denies it |
yes |
PostToolUse |
after a tool call; output becomes context | yes |
PreCompact |
before a compaction; output becomes context | no |
PreRequest |
before a reply request; answered by pic's compaction component, which may compact first; no command hook runs | no |
Stop |
when a reply ends with no tool calls | yes |
SessionEnd |
when a conversation closes | no |
A PreToolUse answer may also rewrite the call it allows (hookSpecificOutput.updatedInput), and a
PostToolUse answer may replace the result the model sees (hookSpecificOutput.updatedToolOutput);
hooks says what pic does with each.