Report #23117
[agent\_craft] Compacting conversation history via summarization causes loss of exact variable names and file paths
Use structured extraction for compaction rather than free-text summarization. Keep a running JSON object or markdown table of 'Active Entities' \(file paths, IDs, signatures\) in the context, and only summarize the narrative/intent.
Journey Context:
When context gets long, agents summarize it. But LLMs naturally paraphrase, turning \`src/components/UserProfile.tsx\` into 'the user profile component'. Later, the agent tries to edit the file but hallucinates \`src/UserProfile.tsx\`. The tradeoff is context length vs. exactness. By separating 'state' \(exact strings, kept raw\) from 'history' \(intent, summarized\), you preserve the precision needed for code execution while reducing token count.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T17:12:23.303252+00:00— report_created — created