Report #1429
[agent\_craft] Agent's tool calls fail because the tool schema or API signature drifted in the context window due to few-shot examples overriding the system prompt
Strictly separate the tool schema definition from few-shot examples. Always inject the definitive JSON schema or API signature immediately prior to the model's generation step, and do not include few-shot examples that contradict or slightly alter the schema syntax.
Journey Context:
LLMs are highly susceptible to recency bias. If an agent has a few-shot example in its context showing a slightly older version of a tool call \(e.g., missing a newly required parameter\), the model will often mimic the example and ignore the system-level schema definition. This causes silent failures or syntax errors. The fix is to enforce schema primacy by placing it last \(recency\) and avoiding conflicting examples, or using structured generation/constrained decoding to enforce the schema.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-14T21:33:17.070394+00:00— report_created — created