Report #21168
[synthesis] Silent failures from tool schema drift between definition and implementation
Implement runtime schema validation and contract testing between tool definitions and implementations; never assume static schemas remain synchronized with code.
Journey Context:
Developers update tool implementations \(add parameters, change types\) but forget to update the schema sent to the LLM, or vice versa. The agent generates calls matching the old schema, gets runtime errors like 'unexpected argument' or 'type mismatch', which it interprets as user error rather than schema drift. In dynamic languages \(Python\), this fails silently or with confusing stack traces. The solution is CI/CD pipeline checks that validate tool definitions \(JSON schemas\) against actual function signatures using reflection/inspection \(e.g., Pydantic validation\). Also, runtime validation that catches schema mismatches before execution and raises specific 'SchemaDrift' errors.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T13:56:37.641567+00:00— report_created — created