{"record":{"id":"ed677150f89e33ac","repo":"mastra-ai/mastra","slug":"processor-missing-message-list-ed6771","errorCode":"PROCESSOR_MISSING_MESSAGE_LIST","errorMessage":"Processor ${processor.id} requires messageList or messages for processInput phase","messagePattern":"Processor (.+?) requires messageList or messages for processInput phase","errorType":"error_code","errorClass":"MastraError","httpStatus":null,"severity":"error","filePath":"packages/core/src/workflows/workflow.ts","lineNumber":1077,"sourceCode":"          return result;\n        } catch (error) {\n          // TripWire errors should end span but bubble up to halt the workflow\n          if (error instanceof TripWire) {\n            processorSpan?.end({ output: { tripwire: error.message } });\n          } else {\n            processorSpan?.error({ error: error as Error, endSpan: true });\n          }\n          throw error;\n        }\n      };\n\n      // Execute the phase with span lifecycle management\n      return executePhaseWithSpan(async () => {\n        switch (phase) {\n          case 'input': {\n            if (processor.processInput) {\n              if (!passThrough.messageList) {\n                throw new MastraError({\n                  category: ErrorCategory.USER,\n                  domain: ErrorDomain.MASTRA_WORKFLOW,\n                  id: 'PROCESSOR_MISSING_MESSAGE_LIST',\n                  text: `Processor ${processor.id} requires messageList or messages for processInput phase`,\n                });\n              }\n\n              // Extract messageList after null check for proper type narrowing\n              const checkedMessageList = passThrough.messageList;\n\n              // Create source checker before processing to preserve message sources\n              const idsBeforeProcessing = (messages as MastraDBMessage[]).map(m => m.id);\n              const check = checkedMessageList.makeMessageSourceChecker();\n\n              const result = await processor.processInput({\n                ...baseContext,\n                messages: messages as MastraDBMessage[],\n                messageList: checkedMessageList,","sourceCodeStart":1059,"sourceCodeEnd":1095,"githubUrl":"https://github.com/mastra-ai/mastra/blob/75dd419e613fe9c39f846ffc500716141b74fda6/packages/core/src/workflows/workflow.ts#L1059-L1095","documentation":"A processor implementing processInput was attached to a workflow step, but no MessageList was available in the pass-through context. processInput operates on the conversation's messages, so the workflow requires a messageList (or messages) to hand to the processor. Missing it means the processor has nothing to process, so the library fails fast with a USER-category MastraError.","triggerScenarios":"Using workflow.createStepFromProcessor / step() with a processor that defines processInput, while the step input contains neither messageList nor messages (e.g. resuming a step with arbitrary data instead of message context).","commonSituations":"Wiring an agent-style message processor into a plain data-transformation workflow; resuming a workflow with resumeData that lacks message context; version changes where messages are no longer auto-converted into a MessageList.","solutions":["Provide a messageList (or messages array) in the step/resume input.","Only attach processInput-capable processors to steps that carry message context.","Use processOutputResult/processInputStep only in phases with messages, or drop the phase from the processor.","Pass raw messages; the library wraps them into a MessageList."],"exampleFix":"// before\nawait step.run({ someData: 1 });\n// after\nawait step.run({ messages: [{ role: 'user', content: 'hello' }] });","handlingStrategy":"validation","validationCode":"if (processor.processInput && !input.messageList && !input.messages) {\n  throw new Error('Step with processInput processor requires messages or messageList');\n}","typeGuard":"function hasMessageContext(i: unknown): i is { messageList?: MessageList; messages?: unknown[] } {\n  return typeof i === 'object' && i !== null && ('messageList' in i || 'messages' in i);\n}","tryCatchPattern":"try {\n  await step.run(input);\n} catch (e) {\n  if (e instanceof MastraError && e.id === 'PROCESSOR_MISSING_MESSAGE_LIST') {\n    await step.run({ ...input, messages: [{ role: 'user', content: String(input) }] });\n  } else throw e;\n}","preventionTips":["Attach message processors only to message-bearing steps.","Seed messages when resuming runs.","Audit processor phases vs workflow data shape.","Prefer non-message phases for pure data workflows."],"tags":["workflow","processor","messages"],"backgroundTag":"processor-missing-message-list","analyzedSha":"75dd419e613fe9c39f846ffc500716141b74fda6","analyzedAt":"2026-08-30T00:15:31.844Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}