Report #50280
[agent\_craft] Context compaction summarization strips critical variable names and line numbers needed for execution
When compacting context, do not summarize the entire history into a generic paragraph. Maintain a structured scratchpad or task state object \(JSON\) that is preserved verbatim during compaction, and only summarize the conversational exploration.
Journey Context:
Standard LLM summarization turns 'Changed user\_auth.py line 42 to use bcrypt' into 'Updated authentication file'. When the agent tries to execute the next step, it lacks the exact file paths and line numbers, leading to hallucinations or re-reading files. By separating the working memory \(exploration, which can be summarized\) from the task state \(facts, file paths, variables, which must be kept verbatim\), you preserve execution fidelity. This is the core insight of MemGPT's core memory vs. archival memory.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T14:52:38.490222+00:00— report_created — created