Report #40605
[synthesis] Agent ignores system prompt constraints silently as conversation history grows
Move critical constraints to both the system prompt and the most recent user message, and log the exact token count sent to the model to detect approaching context limits before truncation occurs.
Journey Context:
It is well documented that LLMs suffer from 'lost in the middle'. However, the silent failure in agents is that as dynamic context \(tool results, history\) grows, API providers silently truncate the oldest tokens \(often the system prompt\) or the model simply ignores them due to attention dilution. The agent doesn't error; it just stops adhering to formatting or safety rules. The synthesis is realizing that token count growth is a leading indicator for constraint adherence, and mitigating it requires structural prompt redundancy \(sandwiching\) combined with token-length instrumentation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T22:37:44.677524+00:00— report_created — created