FlowiseAI/Flowise · error · Error
Error processing thread: ${state}, Thread ID: ${threadId}
Error message
Error processing thread: ${state}, Thread ID: ${threadId} What it means
The assistant polls the run status; when the state is `requires_action_retry` the code re-creates the run up to 3 times. If after 3 retries the state is still `requires_action_retry` (tools keep failing to produce actionable output), it throws 'Error processing thread: requires_action_retry'. The literal state string is interpolated so other terminal states would surface too.
Source
Thrown at packages/components/nodes/agents/OpenAIAssistant/OpenAIAssistant.ts:801
while (state === 'requires_action') {
state = await promise(threadId, runThread.id)
}
let retries = 3
while (state === 'requires_action_retry') {
if (retries > 0) {
retries -= 1
const newRunThread = await openai.beta.threads.runs.create(threadId, {
assistant_id: retrievedAssistant.id,
tool_choice: toolChoice,
parallel_tool_calls: parallelToolCalls
})
runThreadId = newRunThread.id
state = await promise(threadId, newRunThread.id)
} else {
const errMsg = `Error processing thread: ${state}, Thread ID: ${threadId}`
await analyticHandlers.onChainError(parentIds, errMsg, true)
throw new Error(errMsg)
}
}
// List messages
const messages = await openai.beta.threads.messages.list(threadId)
const messageData = messages.data ?? []
const assistantMessages = messageData.filter((msg) => msg.role === 'assistant')
if (!assistantMessages.length) return ''
let returnVal = ''
for (let i = 0; i < assistantMessages[0].content.length; i += 1) {
if (assistantMessages[0].content[i].type === 'text') {
const content = assistantMessages[0].content[i] as OpenAI.Beta.Threads.Messages.TextContentBlock
if (content.text.annotations) {
const message_content = content.text
const annotations = message_content.annotations
View on GitHub (pinned to abe4a8601a)
Solutions
- Inspect the prior tool errors (errors 32/33 fire on each retry) in the logs to find the persistent tool failure.
- Fix or disable the failing tool, then re-run.
- If the model loops on tools, tighten tool descriptions or raise the retry budget after fixing the tool.
- Confirm tools complete well within the run's lifetime.
- Consider simplifying the assistant's tool set to isolate the culprit.
Defensive patterns
Strategy: retry
Try / catch
try {
await assistantNode.run(nodeData, input, options)
} catch (e) {
if ((e as Error).message.startsWith('Error processing thread:')) {
// inspect the inner tool errors (32/33) that forced the retry exhaustion
}
throw e
} Prevention
- Resolve persistent tool failures before relying on the assistant.
- Limit the assistant's tool set to known-working tools during debugging.
- Improve tool descriptions to prevent model tool-call loops.
- Monitor run status analytics to spot retry storms early.
When it happens
Trigger: Tool execution/submission repeatedly fails in a way the loop treats as retryable — tools error on every retry, the model keeps requesting tools that cannot complete, or submission keeps timing out.
Common situations: A tool is broken (so the assistant cannot progress); model stuck in a tool-call loop; submission timeouts due to slow tools; flaky upstream causing repeated partial failure.
Related errors
- Assistant ${selectedAssistantId} not found
- OpenAI ApiKey not found
- Error executing tool. Tool: ${tool.name}. Thread ID: ${threa
- Error submitting tool outputs. Thread ID: ${threadId}. Run I
- ${error}
AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12).
Data as JSON: /api/errors/8540e97118b45f39.
Report an issue: GitHub.