Report #92821
[synthesis] Agent crashes parsing tool call response when model embeds a refusal text inside the tool parameters
Add a validation check on tool string parameters: if the value contains refusal language \(e.g., 'I cannot fulfill'\), treat it as a model refusal rather than passing it to the backend.
Journey Context:
When a user requests a tool call that violates safety policies \(e.g., querying PII via a database tool\), models differ in how they refuse. GPT-4o typically returns a standard text message with zero tool calls. Claude, however, sometimes attempts to maintain the tool-use format by returning a tool\_use block, but places the refusal text inside the parameter value. An agent that blindly trusts parameter values will pass this refusal string to the database, causing a syntax error. The agent must inspect parameter payloads for semantic refusals.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T14:23:20.961080+00:00— report_created — created