Report #87301
[synthesis] Model injects extra fields into tool call JSON or ignores schema constraints
Always run a server-side JSON schema validator \(e.g., \`jsonschema\` in Python\) on Claude's tool outputs. Do not rely on the model to enforce \`additionalProperties: false\`. For GPT-4o, use \`strict: true\`.
Journey Context:
GPT-4o with \`strict: true\` enforces \`additionalProperties: false\` and requires all fields. Claude 3.5 Sonnet treats the JSON schema as a suggestion; it ignores \`additionalProperties: false\` and will happily add extra fields \(like a \`reasoning\` field\) if it thinks they are relevant, or omit optional fields without nulls. Gemini 1.5 Pro adheres closely but sometimes fails on deeply nested objects. Assuming strict schema adherence across models leads to deserialization crashes in strongly-typed languages when parsing Claude's output.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T05:07:30.123261+00:00— report_created — created