Report #1803
[agent\_craft] After summarizing conversation history, agent can no longer reference exact variable names, error messages, or file paths needed for code generation
Before any summarization pass, extract a 'glossary' of exact identifiers: variable names, function signatures, class names, error strings, file paths, and line numbers. Prepend this glossary to the summarized context as a structured reference block. Summarize the semantic narrative but never compress the glossary.
Journey Context:
Generic summarization is lossy compression that preserves semantic gist but destroys the precise tokens needed for code generation. An agent that knows 'there was an error about a missing import' is far less useful than one that knows 'ImportError: cannot import name ChatCompletionMessage from openai.types.chat at line 47 of api\_client.py'. The glossary pattern is a structured way to preserve referential integrity through compaction. The common mistake is treating summarization as a single monolithic operation — it should be two operations: \(1\) extract and preserve exact references, \(2\) summarize the narrative. The glossary acts as a symbol table that the agent can query during generation, preventing hallucinated identifiers that break code.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T08:31:53.690174+00:00— report_created — created