Named list of lifecycle event names that can be hooked.
Details
PRE_TOOL_USE– Before tool execution (can allow/deny/modify input)POST_TOOL_USE– After successful tool execution (can modify output)POST_TOOL_USE_FAILURE– After a tool throws an errorPERMISSION_DENIED– When a tool call is blocked by permissionsPERMISSION_REQUEST– When permission mode is "ask" (bubble/default)USER_PROMPT_SUBMIT– When user submits a prompt, before it reaches the model (aligns with Claude Code's publicUserPromptSubmithook event) (codeagent's name for Claude Code'sUserPromptSubmit)ASSISTANT_MESSAGE– When the assistant produces a text response. NOTE: name collides with Claude Agent SDK'sAssistantMessagemessage type but is used here as a hook event; Claude Code has no such event (it usesStop+last_assistant_message). Kept for its downstream consumer (ui_customizations.R); TODO: evaluate merging intoStop.SESSION_END– When the agent loop terminates (any reason)POST_COMPACT– After context compaction completesSTOP_FAILURE– When the loop terminates on an errorNOTIFICATION– Generic user-facing notificationTASK_CREATED– When a task is created (TaskCreate tool)TASK_COMPLETED– When a task transitions to completedWORKTREE_CREATE– When a sub-agent git worktree is createdWORKTREE_REMOVE– When a sub-agent git worktree is removedINSTRUCTIONS_LOADED– When a CLAUDE.md instruction file is loadedFILE_CHANGED– Filesystem change under cwd (Shiny only)CONFIG_CHANGE– settings file change (Shiny only)
The following Claude Code events are defined for parity but have no live trigger in codeagent (they never fire); see the inline notes:
ELICITATION/ELICITATION_RESULT– need MCP elicitation (mcptools lacks it)TEAMMATE_IDLE– codeagent teams are one-shot mirai workers (no idle state)SETUP– no init/maintenance lifecycle phaseCWD_CHANGED– no run-time cwd-change behaviour