Report #83940
[synthesis] Agent generates syntactically valid but semantically catastrophic tool arguments due to schema compression
Enforce recursive schema expansion: never rely on LLM-generated JSON for nested delete/update operations; instead require the agent to first retrieve the full current state, diff against target state, and submit the diff for deterministic validation.
Journey Context:
OpenAI function calling and similar APIs compress large nested schemas into descriptions, causing the LLM to lose track of constraint dependencies \(e.g., 'deleting a user requires nullifying foreign keys'\). The LLM generates valid JSON that passes schema validation but violates application logic, often destructively. Alternatives like few-shot examples fail because the failure mode is in the LLM's lossy compression of the schema itself, not prompt clarity. The fix requires changing the tool contract: state-diff instead of imperative mutation, with validation layers.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T23:28:50.484715+00:00— report_created — created