session-startRequired
{ readonly prompt: string; readonly source?: "start" | "resume" | "repair"; }
Event for session-start hooks: the rendered prompt.
before-promptRequired
{ readonly prompt: string; readonly source: "initial" | "steering"; }
Context supplied at before-prompt; values are copied and frozen before callback delivery.
before-modelRequired
{ readonly messages: readonly ModelMessage[]; readonly system?: string; }
Event for before-model hooks: the messages about to be sent.
after-modelRequired
{ readonly result: ModelResult; }
Event for after-model hooks: the model result.
model-errorRequired
{ readonly error: unknown; }
Context supplied at model-error; values are copied and frozen before callback delivery.
before-compactionRequired
{ readonly messages: readonly ModelMessage[]; readonly strategy: string; }
Context supplied at before-compaction; values are copied and frozen before callback delivery.
after-compactionRequired
{ readonly messages: readonly ModelMessage[]; readonly strategy: string; }
Context supplied at after-compaction; values are copied and frozen before callback delivery.
before-subagentRequired
{ readonly id: string; readonly name: string; readonly callId: string; readonly prompt: string; }
Context supplied at before-subagent; values are copied and frozen before callback delivery.
after-subagentRequired
{ readonly id: string; readonly name: string; readonly callId: string; readonly text?: string; readonly error?: unknown; readonly conversation?: string; }
Context supplied at after-subagent; values are copied and frozen before callback delivery.
run-endRequired
{ readonly reason: "success" | "error" | "aborted" | "timeout" | "limit"; readonly text?: string; readonly error?: unknown; }
Context supplied at run-end; values are copied and frozen before callback delivery.
before-toolRequired
{ readonly call: ModelToolCallBlock; }
Event for before-tool hooks: the validated call.
after-toolRequired
{ readonly call: ModelToolCallBlock; readonly result: HarnessToolResultView; readonly status?: "success" | "denied" | "error"; }
Event for after-tool hooks: the call and its outcome.
stopRequired
{ readonly text: string; }
Event for stop hooks: the final answer text.