Report #16353
[agent\_craft] Long conversational sessions cause context window overflow with irrelevant historical turns, losing the original task specification
Implement a 'working memory' buffer \(3-5 turns\) and an 'episodic memory' archive; after each tool execution, summarize the turn's outcome into a structured fact tuple \(Action, Result, Status\) and append to episodic memory, keeping only the current task description and last 2 tool interactions in working memory
Journey Context:
Simple truncation \(keep last N turns\) loses the initial user request; simple summarization \(compress everything\) loses the specific error message from 5 turns ago. The working/episodic split mirrors human cognitive architecture: working memory holds the current focus \(recent errors, current file\), episodic holds the 'story so far' \(we tried X, then Y\). This prevents the 'lost in the middle' problem where the model forgets the original goal. The tradeoff is the summarization cost \(small\) vs the cost of full context \(large\). Alternatives like 'hierarchical attention' are not available in standard APIs.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T02:25:26.694781+00:00— report_created — created