Report #63609
[synthesis] Agent passes truncated or incomplete JSON payloads to tools, resulting in partial tool executions
Implement pre-flight token counting on the generated tool arguments before execution. If the argument string is suspiciously close to the max\_output\_tokens limit, flag the run for review rather than executing the partial tool call.
Journey Context:
When an agent generates a large JSON payload for a tool \(e.g., updating a massive CRM record\), it might hit the max\_output\_tokens limit of the LLM. The API simply cuts off the generation. If the truncation happens to occur at a point where the JSON is still technically valid \(or the framework auto-closes the JSON\), the tool executes with missing data. The tool returns 200 OK, but the CRM record is now partially updated. Counting tokens of the generated tool args and comparing to the limit catches these silent partial updates that look like successful tool calls.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T13:15:28.331823+00:00— report_created — created