{"record":{"id":"93639d7c77c85387","repo":"mastra-ai/mastra","slug":"processor-missing-message-list","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/evented/workflow.ts","lineNumber":1171,"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              // Create source checker before processing to preserve message sources\n              const idsBeforeProcessing = (messages as MastraDBMessage[]).map(m => m.id);\n              const check = passThrough.messageList.makeMessageSourceChecker();\n\n              const result = await processor.processInput({\n                ...baseContext,\n                messages: messages as MastraDBMessage[],\n                messageList: passThrough.messageList,\n                systemMessages: (systemMessages ?? []) as CoreMessage[],\n              });\n","sourceCodeStart":1153,"sourceCodeEnd":1189,"githubUrl":"https://github.com/mastra-ai/mastra/blob/75dd419e613fe9c39f846ffc500716141b74fda6/packages/core/src/workflows/evented/workflow.ts#L1153-L1189","documentation":"A processor implementing processInput needs a MessageList to operate on. The evented workflow builds passThrough data and requires passThrough.messageList; if it is absent (and messages were not converted into one), it throws this structured MastraError (id PROCESSOR_MISSING_MESSAGE_LIST, USER category, MASTRA_WORKFLOW domain).","triggerScenarios":"Running a workflow step created via createStep(processor) where processor.processInput exists but the input payload to the step contains neither messageList nor messages — e.g. inputData lacking the messages field the adapter expects.","commonSituations":"Wiring a processor step into a custom workflow and passing plain objects; forgetting that processor steps expect message-list-shaped input (inputData.messages); skipping the agent loop that normally builds the MessageList.","solutions":["Ensure the step's inputData includes messages (or messageList) — feed the processor step from agent/loop output or construct a MessageList and pass it.","If composing manually, build a MessageList from your messages before invoking the processor step.","Only attach processors that implement processInput to flows that supply message data; otherwise use a plain step."],"exampleFix":"// before\nawait processorStep.execute({ inputData: {} });\n\n// after\nawait processorStep.execute({\n  inputData: { messages: [{ role: 'user', content: 'hello' }] },\n});","handlingStrategy":"validation","validationCode":"function assertMessageListInput(inputData: { messageList?: unknown; messages?: unknown }, processorId: string) {\n  if (!inputData?.messageList && !inputData?.messages) {\n    throw new Error(`Step input for processor ${processorId} must include messages or messageList`);\n  }\n}","typeGuard":"const hasMessages = (d: any): d is { messageList: MessageList } =>\n  d?.messageList instanceof MessageList || Array.isArray(d?.messages);","tryCatchPattern":"try {\n  await processorStep.execute({ inputData });\n} catch (e) {\n  if (e instanceof MastraError && e.id === 'PROCESSOR_MISSING_MESSAGE_LIST') {\n    // re-run with a properly built MessageList\n  }\n  throw e;\n}","preventionTips":["Only attach processInput processors to steps fed by agent/loop output that includes messages.","When composing workflows manually, always construct a MessageList for processor steps.","Write an integration test that executes each processor step with realistic message input."],"tags":["processor","messagelist","workflow","input-validation"],"backgroundTag":"processor-missing-messagelist","analyzedSha":"75dd419e613fe9c39f846ffc500716141b74fda6","analyzedAt":"2026-08-30T00:15:31.844Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}