Report #1453
[agent\_craft] Agent hits context limit and uses naive truncation which removes the system prompt or recent task state
Implement a sliding window with a protected prefix \(system prompt \+ current goal\) and a compaction strategy for the middle \(conversation history\).
Journey Context:
Simple truncation \(dropping the oldest messages\) often drops the initial instructions, causing the agent to drift. The system prompt and the current task state must be pinned. The middle \(past tool calls\) can be summarized or dropped, but the prefix and suffix must remain intact. This ensures the agent never forgets 'who it is' or 'what it is doing right now'.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-14T22:33:01.118012+00:00— report_created — created