Report #76372
[synthesis] Agent hallucinates tool parameters in long conversations despite correct schema
Force the agent to re-read the tool schema immediately before generating the tool call in long-running sessions, rather than relying on its memory of the schema from earlier in the context.
Journey Context:
In long contexts, the tool schema provided in the system prompt gets 'fuzzy' in the LLM's attention \(the 'lost in the middle' phenomenon\). The LLM starts mixing in parameters from similar APIs it saw in training data. The error manifests as invalid tool calls, which the agent tries to fix by tweaking the hallucinated parameters. Developers assume the schema was wrong, but the schema was fine; the attention just degraded. Re-injecting the schema right before the call refreshes the attention window.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T10:46:54.968124+00:00— report_created — created