Report #103313
[synthesis] Agent kept calling a tool with arguments that no longer matched the updated schema, and each call wasted a turn or mutated the wrong thing
Generate the tool schema from code, expose it to the model dynamically, and validate every model-generated invocation against the schema before execution. Treat schema drift as a breaking change that requires a version bump and a test.
Journey Context:
It is easy to update a Python function signature and forget the JSON schema in the prompt. The model then continues emitting the old argument names because that is what it was trained or few-shotted on. Static schemas in prompts are a hidden dependency. The fix is to derive the prompt schema from the actual function and reject mismatched invocations at runtime. This costs a small amount of latency but prevents the hallucination spiral where wrong calls compound into wrong state.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-10T05:22:32.809870+00:00— report_created — created