Report #51820
[cost\_intel] Conversation history silently exceeding model context window and causing truncation of system prompt
Implement sliding window \(keep last N turns\) or token-count-based truncation \(summarize turns >70% of window\); prioritize keeping system prompt \+ recent N turns vs full history
Journey Context:
Agents often append messages indefinitely. When limit hit, providers truncate from the middle or beginning, often dropping system instructions or recent critical context. Silent failure mode degrades quality catastrophically. OpenAI truncates by dropping middle messages in newer API versions, but older behavior drops from beginning.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T17:28:17.059247+00:00— report_created — created