mastra-ai/mastra · warning · TripWire
Processor tripwire triggered
Error message
Processor tripwire triggered
What it means
When a run ends with status 'tripwire' — a processor called `tripwire` to abort — start() throws a TripWire error. The reason, retry flag, metadata, and processorId come from the tripwire payload; the literal 'Processor tripwire triggered' is the fallback message when no reason was supplied.
Source
Thrown at packages/core/src/workflows/workflow.ts:2941
},
);
}
}
if (res.status === 'failed') {
const isNonRetryable = Object.values(res.steps).some(stepResult => {
const result = stepResult as StepResult<any, any, any, any>;
return result.status === 'failed' && result.nonRetryable;
});
if (isNonRetryable) {
throw new MastraNonRetryableError(res.error.message, { cause: res.error });
}
throw res.error;
}
if (res.status === 'tripwire') {
const tripwire = res.tripwire;
throw new TripWire(
tripwire?.reason || 'Processor tripwire triggered',
{
retry: tripwire?.retry,
metadata: tripwire?.metadata,
},
tripwire?.processorId,
);
}
return res.status === 'success' ? res.result : undefined;
}
async listWorkflowRuns(args?: StorageListWorkflowRunsInput) {
const storage = this.#mastra?.getStorage();
if (!storage) {
this.logger.debug('Cannot get workflow runs. Mastra storage is not initialized');
return { runs: [], total: 0 };
}View on GitHub (pinned to 75dd419e61)
Solutions
- Catch TripWire specifically: `catch (e) { if (e instanceof TripWire) { ... } }` and inspect e.reason/metadata/processorId.
- Adjust or relax the offending processor's detection rules if the trip was a false positive.
- If `retry: true` was set, re-run with modified input after addressing the reason.
- Supply an explicit `reason` in your processor's tripwire call for clearer errors.
Example fix
// before
await run.start({ inputData });
// after
try {
await run.start({ inputData });
} catch (e) {
if (e instanceof TripWire) {
console.warn('blocked by processor', e.processorId, e.reason, e.metadata);
} else throw e;
} Defensive patterns
Strategy: try-catch
Type guard
function isTripWire(e: unknown): e is TripWire {
return e instanceof TripWire;
} Try / catch
try {
await run.start({ inputData });
} catch (e) {
if (e instanceof TripWire) {
console.warn('tripwire', e.processorId, e.reason, e.metadata, 'retry:', e.retry);
} else throw e;
} Prevention
- Always catch TripWire separately from generic errors around run.start().
- Provide explicit reasons/metadata in processor tripwire calls.
- Review guardrail processor thresholds to avoid false positives.
When it happens
Trigger: A processor (e.g. PII/safety/guardrail processor) invokes `tripwire({ reason, retry, metadata })` during a workflow step's message processing, and the run then reaches `start()`'s tripwire branch.
Common situations: Guardrail processors blocking sensitive content; moderation/safety processors aborting execution; forgetting to catch TripWire in calling code.
Related errors
- Tripwire triggered by ${processor.id}
- MAP_RESULTS_STEP_UNSUPPORTED_MODEL
- Tripwire triggered by ${processor.id}
- PROCESSOR_MISSING_MESSAGE_LIST
- PROCESSOR_RETURNED_EXTERNAL_MESSAGE_LIST
AI-assisted analysis of mastra-ai/mastra@75dd419e61 (2026-08-30).
Data as JSON: /api/errors/544fae4309a6ad4d.
Report an issue: GitHub.