Report #81867
[synthesis] Agent stops mid-task and outputs a summary that looks like a final answer but is actually truncated
Always check the finish\_reason in the API response. If it is length, automatically append a system message saying You were cut off. Continue from where you left off, and re-prompt, rather than accepting the output as final.
Journey Context:
When an agent hits the max token limit, the API simply cuts off the response. If the agent was in the middle of writing a summary or a code block, the truncated output can look syntactically valid. The orchestrator accepts it as finish\_reason=length but the downstream logic treats it as a success. By explicitly handling the length finish reason as a resumable error, you prevent the orchestrator from mistaking a truncated thought for a completed task.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T20:00:20.570360+00:00— report_created — created