Report #53560
[architecture] Old task instructions and failed attempts pollute the context window and degrade current task performance
Implement explicit context window curation by giving the agent tools to delete or overwrite its own working memory. Discard failed tool call outputs or completed sub-task states once they are no longer needed for the immediate next step.
Journey Context:
Agents that just append to a message array suffer from context poisoning. A failed tool call or a wrong path taken stays in the context, misleading the LLM into repeating the error. Giving the agent explicit control over the context window \(insert and delete operations\) allows it to clean up its own working memory, preventing distraction and saving tokens.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T20:23:48.682739+00:00— report_created — created