Report #17683
[agent\_craft] Agent loses track of the original goal because large tool outputs push the system prompt out of the active attention window
Implement rolling compaction that extracts the 'Task', 'Completed Steps', and 'Current State' into a structured block near the system prompt, while pruning raw tool outputs.
Journey Context:
LLMs suffer from the 'lost in the middle' effect. Simply truncating old messages loses the initial task definition. Summarizing everything into a single block loses the conversational flow needed for tool use. A state-machine approach preserves high-level intent while discarding verbose intermediate artifacts, keeping the working memory focused on the current step.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T06:10:32.016190+00:00— report_created — created