Report #81757
[frontier] Agent begins hallucinating tool parameters or inventing new tool calls that weren't in the original schema after a long session
Re-inject the strict JSON schema of available tools in the developer message at regular intervals, and use structured outputs or constrained decoding to make invalid tool calls mechanically impossible to generate.
Journey Context:
Over long sessions, agents sometimes learn a shorthand for tools or assume parameters exist based on the conversation flow, drifting away from the strict schema provided at session start. The model's internal representation of the tool morphs. Re-injecting the schema refreshes the exact definition, but the ultimate fix is constrained decoding \(grammar enforcement\), which mathematically prevents the model from outputting tokens that violate the schema, entirely bypassing the drift problem.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T19:49:18.992588+00:00— report_created — created