How it works
Compaction is a harness step that runs before the next model call. It summarises earlier turns, drops tool payloads, or replaces a long passage with a shorter note so the request fits the window. The run can continue on a model that would otherwise reject the history. The summary is what the model will see. Lines that the summary skipped are gone for that call, even if they remain in a database the prompt never loads.
The risk is selective loss. A summariser that keeps the destination and the time can drop a negation because it looks like a detail beside the booking. Later steps then offer the very option the person had ruled out, and they sound coherent. Rot leaves too much in. Compaction takes something out, and the thing taken out can be the constraint the rest of the task depended on. A tidy plot summary is a different artefact from a note that preserves every binding limit.
A worked example
A wheelchair space the summary deleted
A rail booking thread says the passenger needs a wheelchair space on the 10:40 from Leeds, and that a standard seat with a luggage bay will not do. After several timetable lookups the harness compacts the thread into a line that reads Leeds to London, morning, passenger uses a wheelchair. The next call offers a standard seat and a ramp note. The passenger types the space requirement again. The original words are still in the session store. They are not in the prompt the model just answered. The compacted line kept the journey and lost the constraint that made the seat wrong.
Illustrative example, not a production trace and not a measured result.
What goes wrong
- The summary keeps names and times and drops a negation, so a refusal of a standard seat becomes a note that the passenger uses a wheelchair, and the next offer is a standard seat.
- A tool result that held an error code is replaced by a line that only says the lookup failed, and a later step retries the wrong request because the code that would have changed the path is gone.
- Compaction runs on a timer, including turns that were already short, and the paraphrase drifts from the person's words while the token saving on that turn is trivial.
How to measure it
Compare the prompt that entered the model with the turns that were summarised or dropped. Count sessions where the person repeats a constraint, a negation or an identifier that the compacted text no longer contains, and keep that turn beside the summary.
After you change what compaction is allowed to drop, compare task success for that task and cohort with the previous period. Read the bookings that still offer the seat, the fare or the limit the person had already ruled out.
Further reading
How Abracadabra helps
Read turns where the person repeats a constraint the summary no longer holds, such as a seat type or a limit stated earlier. After the compaction rule changes, compare task success for that task and cohort.
When context is lost, people restate a fact or repeat the request. Abracadabra pins those corrections and repeated intents to the turn. After a change to what the agent keeps, compare task success for that task and cohort with the previous period.
Request access to read this on your own agent.