FeatureFuel
0

AI Agent: return tool-schema validation failures to the model as recoverable errors instead of terminating the execution

Source: n8n-io/n8n#37915 · opened by @HanumanTFM
Environment: n8n 2.37.7, @n8n/n8n-nodes-langchain.agent typeVersion 1.9 (AgentV1), lmChatAnthropic 1.6, @langchain/anthropic 1.5.6, model claude-opus-5, adaptive thinking, streaming, prompt caching 5m, four client tools, all subworkflow-backed. Evidence comes from a transparent proxy placed between n8n and api.anthropic.com, capturing 167 exchanges and 267 tool_use blocks over a production-equivalent workload driven through the real agent loop. Problem When a model emits a tool call that fails the tool's Zod schema validation, AgentV1 raises and the entire execution ends. The user receives nothing. Anthropic explicitly supports continuing the conversation in this case by returning a tool_result with is_error: true, after which the model can attempt a corrected call. n8n instead treats it as fatal. Reproduction, measured Same 25-question set, same agent, one change — a tool parameter declared required rather than carrying a default: | configuration | answers delivered | …

No pledges yet. Be the first to back this.

Make a pledge

Pledge your monetary support if this feature is added.

$

Comments

No comments yet.

Replying to

Add a comment

What do you think about this feature request?


Similar requests