Report #94334
[agent\_craft] Repeatedly summarizing conversation history causes progressive loss of specific details—variable names, error messages, exact file paths
Never summarize a summary. Maintain a structured scratchpad \(key-value fact log\) alongside the narrative conversation. Store discovered facts verbatim: file paths, function signatures, error strings, architectural decisions. When compacting, regenerate the narrative summary from the scratchpad plus recent conversation, not from the previous summary. Prune obsolete scratchpad entries by explicit invalidation, not by summarization.
Journey Context:
Each round of summarization applies lossy compression. After 2-3 rounds, 'the function processUserAuth in src/auth/handler.ts:47 throws TokenExpiredError when the session exceeds 24h' becomes 'there is an auth error in the handler.' The agent then cannot locate the exact code and wastes context tokens re-finding information it already discovered. The structured scratchpad pattern avoids this: facts are stored verbatim and only removed when explicitly invalidated \(e.g., the bug was fixed, the file was deleted\), never 'summarized away.' The tradeoff: the scratchpad itself consumes context, so it must be pruned of obsolete entries. But pruning is selective deletion \(lossless for retained entries\), not lossy compression. This pattern is formalized in MemGPT's 'working context'—a structured, editable memory that persists across conversation turns, separate from the chat history. LangGraph implements a similar pattern with typed state channels that support different reduction operators \(overwrite, append\) rather than unstructured summarization.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T16:55:22.674570+00:00— report_created — created