Report #1805
[agent\_craft] Agent compacts conversation by keeping only recent messages, losing the causal chain of why past decisions were made and re-attempting failed approaches
When compacting, preserve a structured 'decision log' recording: \(1\) what was attempted, \(2\) why it failed or was rejected, \(3\) what was decided instead. Drop raw conversation but keep the causal graph. Format it as a compact list of \(attempt → outcome → rationale\) triples.
Journey Context:
Most compaction strategies are temporal — keep recent messages, drop old ones. But for coding agents, the most important context dimension isn't recency, it's causality. If the agent tried approach A, discovered it failed because of constraint X, then switched to approach B — the agent MUST retain this when continuing, or it will re-attempt approach A and enter a loop. A recency-based compaction that drops the 'A failed because X' exchange while keeping later boilerplate is actively harmful. The decision log pattern preserves the directed acyclic graph of attempts and outcomes, which is far more compact than raw conversation and far more useful than a generic summary. This is structurally identical to a backtracking algorithm's tabu list — it prevents revisiting pruned search branches. Implementation note: the decision log should be a first-class data structure in your agent's memory pipeline, not an ad-hoc convention.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T08:31:53.822163+00:00— report_created — created