I started getting this error since I upgraded versions recently. I’m self hosting if that helps.
messages.0.content.0: unexpected tool_use_id found in tool_result blocks: toolu_01QznNAHXmfM5mwvcqwE6R22. Each tool_result block must have a corresponding tool_use block in the previous message.
This is a known bug with how n8n handles tool call messages for Anthropic’s API, the upgrade probably broke the pairing between tool_use and tool_result blocks. Make sure you’re on the latest version because there were fixes for this in recent releases, and if you have “Enable Thinking” turned on in your Anthropic chat model node try disabling that too.
This is a known bug in how n8n handles tool call messages for Claude models, there’s an open issue on GitHub for it (#18869). What version are you on exactly and do you have “Enable Thinking” turned on in the model config? Disabling that has helped in some cases, also try reducing the number of tools connected to the agent if you can.
Hi @kyka Welcome! The team must be working on to fix that, although if the issue is very big on your side consider down grading to 1.x.x versions they have it resolved.
Thank you for the responsem @Anshul_Namdev. Unfortunately, we could not downgrade to the 1.x.x versions because of the security risks associated with them.
Understood @kyka , have you tried clearing that memory sub node like remove and then add back? and as this is linked to simple memory you can try using Supabase which i personally use to manage AI memory across the sessions.
We are using the Supabase Postgres memory node, an Orchestrator agent, and several sub-agents. Recently, we began encountering errors. I will try reconnecting the memory node. Thank you.