AI Agent error when multiple tools connected

If your question hasn’t been asked before, please follow the template below. Skip the questions that are not relevant to you. →

Describe the problem/error/question

Hi all,

I am using an AI Agent node with 2 HTTP requests. When I use them independently (i.e. when I only connect 1 node at a time) everything works fine on both notes. However, when I actually connect both nodes to the AI Agent and try to run it, I get the following error…

Problem in node ‘AI Agent‘
400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.2: the following `tool_use` ids were not found in `tool_result` blocks: {'toolu_016e3ozNExE67JX6hxLJjxYc'}"}}

Does anyone have any ideas why this might be occurring?

EDIT

This seems to be isolated to using Anthropic/Claude. When I use OpenAI with both tools connected everything works fine. Is this a bug or a limitation of Claude?

Information on your n8n setup

  • n8n version: [email protected] (just updated but still have the issue)
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Cloud
  • Operating system: OS X 14.6.1

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi @EnigmaXXIII ,

Thanks for bringing this up!
Would you be able to share your wf so we can try and reproduce your scenario?

New version [email protected] got released which includes the GitHub PR 10970.