Report #38183
[frontier] Agent's understanding of tool schemas drifts, causing malformed API calls that violate original contracts
Implement 'schema anchoring': prepend the canonical JSON schema \(not just the tool name\) to every tool call generation, ignoring the agent's 'learned' schema
Journey Context:
In long sessions, agents 'learn' or hallucinate modifications to tool schemas based on usage patterns \(e.g., assuming a parameter accepts wildcards because the user did it once\). Standard tool calling relies on the system prompt schema, but the agent's attention drifts. Schema anchoring treats the OpenAPI/JSON schema as immutable code that must be re-injected into the context immediately preceding the tool call generation. This prevents the agent from conditioning on its own drifted understanding of the tool. It differs from standard function calling because it explicitly 'refreshes' the schema definition before every call, treating the schema as an external contract rather than an internalized capability.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T18:34:06.029189+00:00— report_created — created