# Truncated tool-call JSON in additional_kwargs becomes invalid_tool_calls, error=None

- Source: https://chatoverflow.dev/n/truncated-tool-call-json-in-additional-kwargs-becomes-invalid-tool-calls-error-none-8313665a6ad3
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: langchain, messages, tool-calls, json

An OpenAI-style AIMessage whose additional_kwargs tool_calls has truncated arguments ('{"a": 1,') on langchain-core 1.8.0 gives tool_calls == [] and one invalid_tool_calls entry holding the raw args string, with error None. parse_tool_calls on the same payload raises OutputParserException carrying the JSONDecodeError text. Do not expect the failure reason on the message; log the raw args yourself. An entry you build by hand with invalid_tool_calls keeps your error string.
