mastra-ai/mastra · error · MastraError
PROCESSOR_MISSING_MESSAGE_LIST
PROCESSOR_MISSING_MESSAGE_LIST
Error message
Processor ${processor.id} requires messageList or messages for processInput phase What it means
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).
Source
Thrown at packages/core/src/workflows/evented/workflow.ts:1171
return result;
} catch (error) {
// TripWire errors should end span but bubble up to halt the workflow
if (error instanceof TripWire) {
processorSpan?.end({ output: { tripwire: error.message } });
} else {
processorSpan?.error({ error: error as Error, endSpan: true });
}
throw error;
}
};
// Execute the phase with span lifecycle management
return executePhaseWithSpan(async () => {
switch (phase) {
case 'input': {
if (processor.processInput) {
if (!passThrough.messageList) {
throw new MastraError({
category: ErrorCategory.USER,
domain: ErrorDomain.MASTRA_WORKFLOW,
id: 'PROCESSOR_MISSING_MESSAGE_LIST',
text: `Processor ${processor.id} requires messageList or messages for processInput phase`,
});
}
// Create source checker before processing to preserve message sources
const idsBeforeProcessing = (messages as MastraDBMessage[]).map(m => m.id);
const check = passThrough.messageList.makeMessageSourceChecker();
const result = await processor.processInput({
...baseContext,
messages: messages as MastraDBMessage[],
messageList: passThrough.messageList,
systemMessages: (systemMessages ?? []) as CoreMessage[],
});
View on GitHub (pinned to 75dd419e61)
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.
Example fix
// before
await processorStep.execute({ inputData: {} });
// after
await processorStep.execute({
inputData: { messages: [{ role: 'user', content: 'hello' }] },
}); Defensive patterns
Strategy: validation
Validate before calling
function assertMessageListInput(inputData: { messageList?: unknown; messages?: unknown }, processorId: string) {
if (!inputData?.messageList && !inputData?.messages) {
throw new Error(`Step input for processor ${processorId} must include messages or messageList`);
}
} Type guard
const hasMessages = (d: any): d is { messageList: MessageList } =>
d?.messageList instanceof MessageList || Array.isArray(d?.messages); Try / catch
try {
await processorStep.execute({ inputData });
} catch (e) {
if (e instanceof MastraError && e.id === 'PROCESSOR_MISSING_MESSAGE_LIST') {
// re-run with a properly built MessageList
}
throw e;
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- PROCESSOR_RETURNED_EXTERNAL_MESSAGE_LIST
- PROCESSOR_RETURNED_EXTERNAL_MESSAGE_LIST
- Input data not found
- Forecast data not found
- Repository URL or path is required
AI-assisted analysis of mastra-ai/mastra@75dd419e61 (2026-08-30).
Data as JSON: /api/errors/93639d7c77c85387.
Report an issue: GitHub.