Report #45988
[agent\_craft] LLM summarization of past actions destroys exact variable names, file paths, and API endpoints, leading to hallucinated references
Before summarizing a conversation turn, extract all exact identifiers into a structured 'Working Memory' JSON block. Summarize the narrative, but append the JSON block verbatim to the compacted context.
Journey Context:
Summarization is lossy compression. LLMs naturally generalize, turning 'src/api/v2/user\_handler.py' into 'the user API file'. When the agent later needs to edit the file, it hallucinates 'src/api/user\_handler.py'. By separating structural data \(JSON\) from narrative data \(prose\), you get the token savings of summarization without the factual degradation of exact references.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T07:39:52.244929+00:00— report_created — created