Report #27255
[research] Agent silently truncates context leading to unexplained task abandonment
Add observability guards that log the exact token count of the prompt array before the LLM call, and alert if the agent's final message lacks a requested tool call but doesn't contain a termination phrase.
Journey Context:
When an agent's context window fills up, the API often silently truncates or the model simply stops calling tools and outputs a partial response. It doesn't throw an error. Without logging the input token count, you assume the agent chose to finish, when it actually forgot the instructions. Tracking prompt length vs. tool call presence is critical.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T00:08:33.501553+00:00— report_created — created