Report #95000
[frontier] Agent ignores prompt instructions about tool usage constraints and passes invalid arguments
Encode constraints directly in tool JSON Schemas \(enum, pattern, minItems, maxItems, minimum/maximum\) — schemas are programmatically enforced by structured output APIs, prompt instructions are not
Journey Context:
Teams spend hours crafting prompt instructions like 'only call this with valid email addresses' or 'never pass more than 10 items.' LLMs frequently violate these because natural language constraints are soft — the model can ignore them. The emerging pattern: encode all constraints in the tool's JSON Schema definition. Use enum for fixed value sets, pattern for regex validation, minItems/maxItems for array bounds, minimum/maximum for numeric ranges. Structured output enforcement \(OpenAI Structured Outputs, Anthropic tool\_use\) guarantees the LLM's tool call conforms to the schema before execution. This shifts guardrails from soft \(prompt-based, easily violated\) to hard \(schema-enforced, impossible to violate\). The tradeoff: overly strict schemas can prevent the agent from handling legitimate edge cases, and you must think carefully about what constraints are truly required vs. merely preferred. But a schema violation is caught before the tool executes, not after it crashes.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T18:02:16.290641+00:00— report_created — created