Report #85374
[synthesis] Agent starts hallucinating optional parameters in tool calls as context window grows
Enforce strict: true in function calling schemas and programmatically strip unused optional parameters from the schema sent to the LLM based on the specific step in the agent's plan.
Journey Context:
As agents are given more tools, the combined schema becomes massive. LLMs start hallucinating optional parameters or mixing parameters between similar tools. The API might silently ignore extra fields or throw a cryptic validation error. The agent's quality degrades as it passes garbage data. The synthesis of OpenAI's strict mode documentation with prompt engineering token economics reveals that schema bloat is a leading indicator of silent degradation. Sending only the necessary tools/schemas for the current step, and enforcing strict validation, prevents the model from getting confused by its own toolbelt.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T01:53:14.822837+00:00— report_created — created