FlowiseAI/Flowise · error · Error
Error executing tool. Tool: ${tool.name}. Thread ID: ${threa
Error message
Error executing tool. Tool: ${tool.name}. Thread ID: ${threadId}. Run ID: ${runThreadId} What it means
During the assistant run loop, when a run reaches `requires_action`, the code executes each requested tool. If a tool's execution throws, onToolError fires, the error is console.error'd, and a generic 'Error executing tool' message is thrown — the original tool error `e` is NOT included in the message, only tool name, threadId, and runThreadId.
Source
Thrown at packages/components/nodes/agents/OpenAIAssistant/OpenAIAssistant.ts:587
const toolOutput = await tool.call(actions[i].toolInput, undefined, undefined, {
sessionId: threadId,
chatId: options.chatId,
input
})
await analyticHandlers.onToolEnd(toolIds, toolOutput)
submitToolOutputs.push({
tool_call_id: actions[i].toolCallId,
output: toolOutput
})
usedTools.push({
tool: tool.name,
toolInput: actions[i].toolInput,
toolOutput
})
} catch (e) {
await analyticHandlers.onToolError(toolIds, e)
console.error('Error executing tool', e)
throw new Error(
`Error executing tool. Tool: ${tool.name}. Thread ID: ${threadId}. Run ID: ${runThreadId}`
)
}
}
try {
const result = await handleToolSubmission({
openai,
threadId,
runThreadId,
submitToolOutputs,
tools,
analyticHandlers,
parentIds,
llmIds,
sseStreamer,
chatId,
options,View on GitHub (pinned to abe4a8601a)
Solutions
- Read server logs for the `Error executing tool` line — it prints the original error `e`.
- Run the named tool standalone with the same args to reproduce.
- Fix the tool (credential, args, upstream service).
- If the model routinely emits bad args, improve the tool's function schema/description.
- Patch the throw to append the cause: `... Run ID: ${runThreadId}. Cause: ${e instanceof Error ? e.message : String(e)}`.
Example fix
// before
throw new Error(
`Error executing tool. Tool: ${tool.name}. Thread ID: ${threadId}. Run ID: ${runThreadId}`
)
// after
throw new Error(
`Error executing tool. Tool: ${tool.name}. Thread ID: ${threadId}. Run ID: ${runThreadId}. Cause: ${e instanceof Error ? e.message : String(e)}`,
{ cause: e }
) Defensive patterns
Strategy: try-catch
Try / catch
try {
await assistantNode.run(nodeData, input, options)
} catch (e) {
if ((e as Error).message.startsWith('Error executing tool.')) {
const toolName = /Tool: ([^.]+)\./.exec((e as Error).message)?.[1]
// inspect server log for the original tool error, fix that tool
}
throw e
} Prevention
- Configure credentials for every tool the assistant may call.
- Tighten tool function schemas so the model emits valid args.
- Test each tool standalone before adding it to the assistant.
- Monitor onToolError analytics to catch failing tools early.
When it happens
Trigger: A configured tool fails when invoked by the assistant: tool credential missing, tool's external API errors, tool input args malformed by the model, tool code throws unexpectedly.
Common situations: Tool needs an API key that is absent; the model produced tool args the tool rejects; the tool's upstream service is down; tool implementation has a bug for certain inputs.
Related errors
- ${error}
- Error in Agent node: ${error instanceof Error ? error.messag
- ${getErrorMessage(e)}
- Assistant ${selectedAssistantId} not found
- OpenAI ApiKey not found
AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12).
Data as JSON: /api/errors/264d68a961d55c83.
Report an issue: GitHub.