Report #38045
[agent\_craft] Agent abruptly fails or forgets its persona/instructions when the context window fills up and the framework applies naive truncation
Implement a sliding window with protected zones: never truncate the system prompt or the last N turns, and aggressively summarize/compress the middle turns \(the 'journey'\).
Journey Context:
Frameworks often truncate from the top \(FIFO\) when the context overflows. This destroys the system prompt. Other frameworks truncate the oldest tool outputs, but lose the initial problem statement. The solution is to partition the context: System \(protected\), History \(compressible/summarizable\), and Working Memory \(recent turns, protected\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T18:20:06.436697+00:00— report_created — created