{"record":{"id":"63edc9b9064ac16c","repo":"mastra-ai/mastra","slug":"tripwire-triggered-in-workflow-workflow-id","errorCode":null,"errorMessage":"Tripwire triggered in workflow ${workflow.id}","messagePattern":"Tripwire triggered in workflow (.+?)","errorType":"exception","errorClass":"TripWire","httpStatus":null,"severity":"error","filePath":"packages/core/src/processors/runner.ts","lineNumber":585,"sourceCode":"        ...input,\n        // Pass the processorStates map so workflow processor steps can access their state\n        processorStates: this.processorStates,\n        // Pass abortSignal so processors can cancel in-flight work\n        abortSignal,\n        agent: this.agent,\n      } as ProcessorStepOutput,\n      ...observabilityContext,\n      requestContext,\n      outputWriter: writer ? chunk => writer.custom(chunk) : undefined,\n    });\n\n    // Check for tripwire status - this means a processor in the workflow called abort()\n    if (result.status === 'tripwire') {\n      const tripwireData = (\n        result as { tripwire?: { reason?: string; retry?: boolean; metadata?: unknown; processorId?: string } }\n      ).tripwire;\n      // Re-throw as TripWire so the agent handles it properly\n      throw new TripWire(\n        tripwireData?.reason || `Tripwire triggered in workflow ${workflow.id}`,\n        {\n          retry: tripwireData?.retry,\n          metadata: tripwireData?.metadata,\n        },\n        tripwireData?.processorId || workflow.id,\n      );\n    }\n\n    // Check for execution failure\n    if (result.status !== 'success') {\n      // Collect error details from the workflow result and failed steps\n      const details: string[] = [];\n      if (result.status === 'failed') {\n        if (result.error) {\n          details.push(result.error.message || JSON.stringify(result.error));\n        }\n        for (const [stepId, step] of Object.entries(result.steps)) {","sourceCodeStart":567,"sourceCodeEnd":603,"githubUrl":"https://github.com/mastra-ai/mastra/blob/75dd419e613fe9c39f846ffc500716141b74fda6/packages/core/src/processors/runner.ts#L567-L603","documentation":"When a sub-workflow run as a processor finishes with status 'tripwire', executeWorkflowAsProcessor re-throws it as a TripWire so the surrounding agent/processor pipeline handles it uniformly. The default message is used when the inner workflow's tripwire data carries no reason (e.g. an inner abort() without a reason).","triggerScenarios":"runOutputProcessors / runInputProcessors / runProcessOutputStep / runProcessToolResult executes a workflow via executeWorkflowAsProcessor and result.status === 'tripwire' with no tripwireData.reason.","commonSituations":"Nesting a workflow as a processor where an inner step calls abort() without a message; wrapping workflows whose suspend/tripwire paths aren't wired with reasons; version drift where inner tripwire payload shape changed.","solutions":["Fix the inner workflow: make every abort(reason) call include a message so it propagates.","Catch this TripWire and inspect metadata/processorId to identify which inner step tripped.","Check tripwireData?.retry — if false, don't retry; adjust the pipeline instead.","Upgrade @mastra/core if inner tripwire reasons are set but lost during re-wrap (payload propagation bug)."],"exampleFix":"// before (inner processor)\nabort();\n// after\nabort('Output failed safety check', { retry: false });","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  await runProcessors(input);\n} catch (e) {\n  if (e?.name === 'TripWire' && e.processorId) {\n    // tripwireData.retry === false means do not retry; inspect metadata\n  } else throw e;\n}","preventionTips":["Ensure inner workflows always abort with reasons.","Decide retry policy explicitly in abort options of inner steps.","Pin @mastra/core versions across the pipeline so tripwire payloads match."],"tags":["tripwire","workflows","processors","abort"],"backgroundTag":"processor-tripwire","analyzedSha":"75dd419e613fe9c39f846ffc500716141b74fda6","analyzedAt":"2026-08-30T00:15:31.844Z","schemaVersion":2},"datasetVersion":"2026-08-30T08:17:16.595Z"}