Report #8447
[agent\_craft] Agent summarizes previously read code to save context, then fails to apply correct edits because exact whitespace/variable names were lost
Never summarize the specific code blocks targeted for modification. Keep the exact source text of the edit zone in context, while summarizing the surrounding context and historical tool calls.
Journey Context:
Aggressive context compaction \(summarizing everything\) saves tokens but destroys the exact string matching required for search-and-replace or diff application. The agent needs the semantic context of the whole file, but the syntactic exactness of the target lines. Hybrid context management: compress history and distant code, but preserve verbatim text for the current working scope.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T05:35:51.508051+00:00— report_created — created