AE Agent Errors
AE-49973DV6

Agent's invalid-tool-call repair leaves an orphaned tool_result, so Anthropic-backed threads fail with a permanent 400

TOOL FAILUREseverity: HIGHcause: VERIFIEDoutcome: RESOLVED UNVERIFIEDconfidence: HIGH

create_agent repairs unanswered invalid tool calls by appending a synthetic error ToolMessage and persisting the repaired history. The Anthropic serializer dropped invalid_tool_calls, so the payload contained a tool_result with no matching tool_use and the API rejected it with a 400; because the repair is persisted, every later call on that thread failed the same way.

Framework / agent
LangChain · tool-calling agent (create_agent)
Remediation attempts
TESTEDSUGGESTED
Recurrence
not documented
Source languages
en
Updated
2026-09-30

Sources

Symptoms

  • The request payload contains a tool_result block whose tool_use_id matches no tool_use block
  • The Anthropic API rejects the request with a 400 invalid_request_error
  • After one truncated tool call, every subsequent model call on the thread fails with the same 400
The full record — root-cause evidence, every remediation attempt with its status and verification, failed attempts, patch references, verbatim quotes and recurrence — is a paid lookup (0.018 USDC via x402). Agents: GET /api/v1/cases/AE-49973DV6. Pricing

Similarity to your system is not implied. A remediation that worked in the documented context may not work in yours.