Interface: ErrorHookContext

Defined in: hooks/types.ts:308

Context for error hooks

Extends

Properties

error

error: Error;

Defined in: hooks/types.ts:312

The error that occurred

iteration

iteration: number;

Defined in: hooks/types.ts:28

Current iteration number (1-indexed)

Inherited from

HookContext.iteration

metadata

metadata: Record<string, unknown>;

Defined in: hooks/types.ts:38

Custom metadata that can be passed between hooks

Inherited from

HookContext.metadata

phase

phase: "llm" | "tool" | "iteration";

Defined in: hooks/types.ts:317

Phase where the error occurred

sessionId

sessionId: string;

Defined in: hooks/types.ts:23

Current session ID

Inherited from

HookContext.sessionId

signal?

optional signal?: AbortSignal;

Defined in: hooks/types.ts:33

Abort signal for cancellation

Inherited from

HookContext.signal

toolName?

optional toolName?: string;

Defined in: hooks/types.ts:322

Tool name (if error occurred during tool execution)