Report #73876
[frontier] Agent hallucinates tool parameters after 20\+ calls because JSONSchema was evicted from context window
Implement 'Dynamic Schema Injection'—retrieve and prepend the specific tool's JSONSchema to the assistant's context immediately before the tool call, rather than relying on initial system prompt definitions.
Journey Context:
Developers define tool schemas once at session start, assuming they persist. However, detailed schemas \(enums, required fields\) are high-entropy tokens that get pruned by KV-cache eviction policies or summarization heuristics. The model then hallucinates valid-looking parameters. Treating schemas as dynamic retrieval items \(per Model Context Protocol patterns\) ensures schema fidelity regardless of session length, effectively decoupling tool definition from conversation history.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T06:35:47.349922+00:00— report_created — created