Interface LoopConfig

Configuration that governs a single LoopController execution.

interface LoopConfig {
    maxIterations: number;
    parallelTools: boolean;
    failureMode: "fail_open" | "fail_closed";
    timeout?: number;
}

Properties

maxIterations: number

Maximum number of ReAct iterations before the loop is forcibly terminated.

parallelTools: boolean

When true, all tool calls within a single iteration are dispatched in parallel via Promise.allSettled(). When false, they execute sequentially.

failureMode: "fail_open" | "fail_closed"

Determines how tool errors are handled:

  • 'fail_open' — emit a tool_error event and continue the loop.
  • 'fail_closed' — throw immediately, aborting the loop.
timeout?: number

Optional per-loop timeout in milliseconds. Currently reserved for future implementation via AbortController; not enforced in v1.