Hooks
41 braynee lifecycle hooks across 15 Claude Code events.
Hooks
braynee wires 41 lifecycle hooks across 15 Claude Code events. They run automatically — this is what makes the second brain ambient rather than something you have to remember to use.
SessionStart
9 hooks — A Claude Code session begins (startup, resume, clear, or after a compaction).
PreToolUse
5 hooks — Before a tool call runs — used here to gate git operations.
SessionEnd
1 hook — The Claude Code session terminates.
UserPromptSubmit
2 hooks — Every time the user submits a prompt, before the model processes it.
Stop
5 hooks — The agent finishes responding (turn ends) — session wind-down checks.
StopFailure
1 hook — Claude Code fires the StopFailure event.
PreCompact
1 hook — Immediately before Claude Code compacts the conversation context.
PostCompact
1 hook — Immediately after a compaction completes.
PostToolUse
10 hooks — After a tool call completes — drives the beads/TaskNotes/session mirrors.
PostToolBatch
1 hook — Claude Code fires the PostToolBatch event.
ConfigChange
1 hook — Claude Code fires the ConfigChange event.
CwdChanged
1 hook — Claude Code fires the CwdChanged event.
FileChanged
1 hook — Claude Code fires the FileChanged event.
TaskCreated
1 hook — A Claude Code task is created.
TaskCompleted
1 hook — A Claude Code task is marked complete.