Skip to content

InterruptEvent

Defined in: src/hooks/events.ts:708

Event emitted when an interrupt is raised during agent execution. The interrupt.source field discriminates between tool-callback and hook-callback origins. One event fires per unanswered interrupt at the moment the agent stops to wait for responses.

new InterruptEvent(data): InterruptEvent;

Defined in: src/hooks/events.ts:714

ParameterType
data{ agent: LocalAgent; interrupt: Interrupt; invocationState: InvocationState; }
data.agentLocalAgent
data.interruptInterrupt
data.invocationStateInvocationState

InterruptEvent

HookableEvent.constructor

readonly type: "interruptEvent";

Defined in: src/hooks/events.ts:709


readonly agent: LocalAgent;

Defined in: src/hooks/events.ts:710


readonly interrupt: Interrupt;

Defined in: src/hooks/events.ts:711


readonly invocationState: InvocationState;

Defined in: src/hooks/events.ts:712

toJSON(): Pick<InterruptEvent, "type"> & {
interrupt: {
id: string;
name: string;
reason?: JSONValue;
response?: JSONValue;
source: InterruptSource;
};
};

Defined in: src/hooks/events.ts:722

Serializes for wire transport, excluding agent and invocationState.

Pick<InterruptEvent, "type"> & { interrupt: { id: string; name: string; reason?: JSONValue; response?: JSONValue; source: InterruptSource; }; }