Skip to content

Function: executeLimitExceededSequence() ​

ts
function executeLimitExceededSequence<THandle>(params): Promise<LimitExceededFlushResult>;

Defined in: runtime/policy/execute-limit-exceeded-flush.ts:262

Executes the 4-step crash-safe .onLimitExceeded() epistemic flush and abort sequence (SPEC.md §3.5).

  1. Synthesizes [Aborted: Limit Exceeded] results for unfinished remainingCalls and writes the role: 'tool' wire frame.
  2. Injects [LIMIT_EXCEEDED_FLUSH], invokes 1 final toolChoice: 'none' turn with effort: 'low' and flushInterrupt.schema, and persists flushedInterruptPayloadJson.
  3. Quiesces all active ServiceSession daemons, runs abortHook (or restores baseScopeCheckpoint), and resets step-scoped topology overlay mutations.
  4. Atomically transitions the step to 'INTERRUPTED' (discarding step lessons) and promotes any .replaceWith() executable.

Type Parameters ​

Type ParameterDefault typeDescription
THandleunknownRuntime handle type of the active isolation scope.

Parameters ​

ParameterTypeDescription
paramsLimitExceededFlushParams<THandle>Limit-exceeded flush parameters and stores.

Returns ​

Promise<LimitExceededFlushResult>

Flushed interrupt payload, abort metadata, and updated frame.

Released under the MIT License.