{"record":{"id":"ef2ea8495de6f9f2","repo":"mastra-ai/mastra","slug":"tripwire-triggered-by-processor-id-ef2ea8","errorCode":null,"errorMessage":"Tripwire triggered by ${processor.id}","messagePattern":"Tripwire triggered by (.+?)","errorType":"exception","errorClass":"TripWire","httpStatus":null,"severity":"warning","filePath":"packages/core/src/workflows/workflow.ts","lineNumber":747,"sourceCode":"        messageId,\n        rotateResponseMessageId,\n        // toolResult phase fields\n        toolName,\n        toolCallId,\n        args: toolCallArgs,\n        toolResultValue,\n        providerExecuted,\n        // Shared processor states map for accessing persisted state\n        processorStates,\n        // Abort signal for cancelling in-flight processor work (e.g. OM observations)\n        abortSignal,\n        // Agent reference so processors can access the running agent (e.g. on signal/schedule wake)\n        agent,\n      } = input;\n\n      // Create a minimal abort function that throws TripWire\n      const abort = (reason?: string, options?: { retry?: boolean; metadata?: unknown }): never => {\n        throw new TripWire(reason || `Tripwire triggered by ${processor.id}`, options, processor.id);\n      };\n      const initialMessageId = messageId;\n      let currentMessageId = messageId;\n      const rotateCurrentResponseMessageId = rotateResponseMessageId\n        ? () => {\n            currentMessageId = rotateResponseMessageId();\n            return currentMessageId;\n          }\n        : undefined;\n      const defaultOutputResult: OutputResult = {\n        text: '',\n        usage: { inputTokens: 0, outputTokens: 0, totalTokens: 0 },\n        finishReason: 'unknown',\n        steps: [],\n      };\n\n      const buildProcessorSpanInput = () => {\n        switch (phase) {","sourceCodeStart":729,"sourceCodeEnd":765,"githubUrl":"https://github.com/mastra-ai/mastra/blob/75dd419e613fe9c39f846ffc500716141b74fda6/packages/core/src/workflows/workflow.ts#L729-L765","documentation":"When a Processor runs inside a workflow step, the library injects a minimal abort function that always throws a TripWire. Calling abort() inside processInput/processOutputResult etc. halts processing (or cancels the run, depending on caller) with the provided reason. The default message includes the processor id when no reason is supplied.","triggerScenarios":"A processor implementation calls abort() with no reason argument; the workflow's cancel() or nestedAbortCb path invokes the injected abort. TripWire then propagates up and is handled by the workflow runner to stop execution.","commonSituations":"Content-moderation processors tripping on unsafe input; custom guardrail processors rejecting payloads; developers forgetting to pass a descriptive reason string to abort(); cancellation of a suspended/nested run.","solutions":["Pass a meaningful reason to abort('reason') so logs and errors are actionable.","Catch TripWire in the surrounding step/run if abort is expected behavior.","Check which processor id appears in the message and review its abort conditions.","Set retry: true in abort options if the failure should be retriable."],"exampleFix":"// before\nabort();\n// after\nabort('Input failed PII policy check', { metadata: { field: 'email' } });","handlingStrategy":"try-catch","validationCode":"const willAbort = shouldReject(input);\nif (willAbort) abort('Descriptive reason here'); // pass reason at call site, not required pre-check","typeGuard":"function isTripWire(e: unknown): e is TripWire {\n  return e instanceof TripWire;\n}","tryCatchPattern":"try {\n  await run.start({ inputData });\n} catch (e) {\n  if (isTripWire(e)) {\n    console.warn('Processor aborted:', e.reason, e.processorId);\n  } else throw e;\n}","preventionTips":["Always pass a reason string to abort().","Catch TripWire at the run level.","Log processor id and metadata for triage.","Use retry: true only for transient guardrail failures."],"tags":["workflow","processor","tripwire","abort"],"backgroundTag":"processor-tripwire-abort","analyzedSha":"75dd419e613fe9c39f846ffc500716141b74fda6","analyzedAt":"2026-08-30T00:15:31.844Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}