Report #60650
[synthesis] Model ignores system prompt constraints when generating tool calls or post-tool responses
For Claude, repeat critical formatting constraints in the last user message \(recency bias\). For GPT-4o, ensure the system prompt is authoritative. For Gemini, use system instructions via the API rather than prepending to the user message.
Journey Context:
When an agent has a system prompt 'Always respond in JSON' or 'Always speak French', and a tool is called, models behave differently post-tool. GPT-4o generally maintains the system prompt constraint post-tool. Claude 3.5 Sonnet exhibits strong recency bias; the tool result overwhelms the system prompt, and it might reply in English or conversational text. Gemini prioritizes API-level system instructions over prompt-prefixed ones. The cross-model synthesis: system prompts are not equally sticky. Critical constraints must be reinforced via recency \(appending to the latest user/tool message\) for Claude, and set via API fields for Gemini.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T08:17:26.422247+00:00— report_created — created