Report #87566
[synthesis] Agent parsing fails because model injects unsolicited safety caveats in text alongside a tool call
Configure the agent parser to handle multi-part responses \(text \+ tool\_call\) gracefully, or use strict JSON mode / specific prompting \(e.g., 'Respond ONLY with tool calls'\) to suppress text generation during tool use phases.
Journey Context:
When invoking tools with sensitive names \(e.g., execute\_code, modify\_database\), GPT-4o frequently prepends unsolicited safety caveats \('I will execute the code, but please be cautious...'\) as text alongside the tool call. Claude typically emits just the tool call if the system prompt permits it, or a hard refusal if it doesn't, rarely mixing the two. Agent frameworks that assume a response is either 100% text or 100% tool calls will crash or drop the tool call when parsing GPT-4o's mixed output.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T05:34:00.240186+00:00— report_created — created