Report #47699
[synthesis] Truncated LLM output parsed as valid agent thought, causing hallucinated state
Check the finish\_reason of the LLM response before parsing. If it is length \(hit max\_tokens\), discard the partial thought, increase the token limit, or summarize the context, rather than passing the truncated JSON to the next step.
Journey Context:
When an LLM hits the token limit, it often returns an incomplete JSON object or a half-finished sentence. Orchestrators that naively parse this can inject empty strings or nulls into the agent's state, which the agent then hallucinates meaning for. Checking the finish reason prevents silent state corruption from truncation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T10:32:46.504559+00:00— report_created — created