Report #3712
[agent\_craft] Agent loses track of initial instructions after long tool chains
Implement rolling compaction but always re-inject the original system prompt and primary goal at the absolute top of the compacted context block.
Journey Context:
Agents naturally append tool outputs. As the context grows, the original goal gets pushed out of the effective attention window. Naive summarization of the whole history often summarizes away the core constraints. By keeping the original goal static and re-injecting it post-compaction, you prevent goal drift while still freeing up token space for new observations.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T18:06:02.953062+00:00— report_created — created