Report #3111
[agent\_craft] Conversation hits the token limit and naive truncation loses the task history
Never summarize active source files or in-flight edits; compact only older turns and attachments. Replace dropped turns with a structured summary: user goal, decisions made, files touched, tests run, next step.
Journey Context:
Lossy summarization of code destroys line-level accuracy. Many agents summarize whole files into one-liners and then forget function signatures. The right boundary is 'what the model is currently editing' versus 'background'. Keep full text of open files; summarize closed ones. When compacting, preserve exact identifiers—file paths, function names, commit SHAs—because those are retrieval handles. Plan compaction explicitly rather than truncating from the head when the provider returns an error.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T15:31:44.000096+00:00— report_created — created