mastra-ai/mastra · error · TripWire
Tripwire triggered by ${processor.id}
Error message
Tripwire triggered by ${processor.id} What it means
Inside the state-signal execution loop, the runner defines an abort(reason?, options?) helper for each processor; when the processor calls abort() without a reason, this default message is thrown as a TripWire tagged with the processor's id. It signals the processor deliberately stopped the run, but gave no explanation.
Source
Thrown at packages/core/src/processors/runner.ts:511
retryCount,
rotateResponseMessageId,
}: {
workflow: ProcessorWorkflow;
messageList: MessageList;
stepNumber: number;
steps: Array<StepResult<any>>;
requestContext?: RequestContext;
writer?: ProcessorStreamWriter;
memory?: MastraMemory;
resourceId?: string;
threadId?: string;
abortSignal?: AbortSignal;
retryCount: number;
rotateResponseMessageId?: () => string;
}): Promise<void> {
for (const processor of workflow.__stateSignalProcessors ?? []) {
const abort = <TMetadata = unknown>(reason?: string, options?: TripWireOptions<TMetadata>): never => {
throw new TripWire(reason || `Tripwire triggered by ${processor.id}`, options, processor.id);
};
await this.runComputeStateSignal({
processor,
messageList,
stepNumber,
steps,
requestContext,
writer,
abort,
processorState: this.getProcessorState(processor.id),
memory,
resourceId,
threadId,
abortSignal,
retryCount,
rotateResponseMessageId,
});View on GitHub (pinned to 75dd419e61)
Solutions
- Find the processor named in the TripWire (processor.id) and pass a descriptive reason to abort('why').
- Handle the TripWire in your agent/run code (catch and inspect tripwire.processorId/retry/metadata).
- If the abort is unintentional, fix the processor's condition that triggers it.
- Add metadata to the abort options so downstream handlers can act on structured data.
Example fix
// before
abort();
// after
abort('Input flagged by moderation policy', { retry: false, metadata: { score } }); Defensive patterns
Strategy: try-catch
Try / catch
try {
await agent.generate(input);
} catch (e) {
if (e?.name === 'TripWire') {
console.error(`Processor ${e.processorId} aborted without a reason`);
// route to fallback behavior or surface to user
} else throw e;
} Prevention
- Always pass a reason string when calling abort() in custom processors.
- Review third-party processors for abort() calls without reasons.
- Test processors' reject paths so trips are intentional and documented.
When it happens
Trigger: A processor's computeStateSignal implementation calls abort() (or abort(undefined, someOptions)) — i.e. a deliberate tripwire with no reason string — executed via runComputeStateSignal during runWorkflowComputeStateSignals or runProcessInputStep.
Common situations: Custom processors that call abort() conditionally but omit the reason argument; third-party processors with incomplete abort handling; content-moderation processors rejecting input without messaging.
Related errors
- Tripwire triggered in workflow ${workflow.id}
- Aborted by processor
- TokenLimiterProcessor: System messages alone exceed token li
- TokenLimiterProcessor: No messages fit within the remaining
- [Processor:${processor.id}] computeStateSignal requires Mast
AI-assisted analysis of mastra-ai/mastra@75dd419e61 (2026-08-30).
Data as JSON: /api/errors/97aa9171ad2f0230.
Report an issue: GitHub.