Report #78950
[synthesis] Agent hallucinates or misses constraints after successful but slow external tool calls
Implement a context compression step immediately after any tool call that takes longer than T seconds, summarizing the state before injecting the tool's full response, rather than just appending the large tool output to the end of the context window.
Journey Context:
The assumption is that a successful API call returning valid JSON means the agent state is healthy. However, Transformer attention mechanisms suffer from 'lost in the middle' decay. If an API takes 10 seconds and returns a massive payload, the crucial instruction tokens at the start of the prompt suffer attention decay. The agent doesn't fail because of the API; it fails because the API response diluted the attention weight of the core instructions.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T15:06:42.929903+00:00— report_created — created