CompactionRecord
Interface: CompactionRecord
Defined in: src/core/agent/window/types.ts:234
What one OVER-BUDGET visit to summarizeOldest (what .compaction()
configures) put in the ledger.
Extends
Properties
droppedObservations?
readonlyoptionaldroppedObservations?: readonlystring[]
Defined in: src/core/agent/window/types.ts:179
The tools whose RESULTS left the window on this visit, in first-appearance order (9.57.0). Present only when at least one did.
This is the record's half of the sentence the drop notice says on the wire, and it is filed even when no notice was authored at all — a removal further into the window tells the model nothing, and then this is the only place the fact exists. Uncapped and unfiltered, because the record is not the wire: the notice prints at most four names and only plain identifiers, this prints every name exactly as the tool declared it.
The failure it exists for was measured: a model whose whats_here result
had been evicted assembled a plausible id from an entity name it
remembered, was refused, and spent actions on it — and nothing in the run
said the evidence had gone.
Inherited from
WindowRecord.droppedObservations
iteration
readonlyiteration:number
Defined in: src/core/agent/window/types.ts:153
ReAct iteration this visit belongs to.
Inherited from
measuredTokens
readonlymeasuredTokens:number
Defined in: src/core/agent/window/types.ts:236
Adapter-reported input tokens of the last call — what tripped the check.
observations?
readonlyoptionalobservations?:WindowObservations
Defined in: src/core/agent/window/types.ts:189
What the last-tool-result pin did on this visit (9.57.0). Present only when it did something: held a turn, turned one away at the ceiling, or stood down.
See WindowObservations. An agent with keepLastToolResults: false
— or one whose window held no pinnable tool result — never carries this
key, so its records are the exact shape they were before 9.57.0.
Inherited from
overBudget
readonlyoverBudget:boolean
Defined in: src/core/agent/window/types.ts:240
True when the measurement was over budget (a fold was attempted).
refusals
readonlyrefusals: readonlyWindowRefusal[]
Defined in: src/core/agent/window/types.ts:162
Every turn that refused to leave, named.
Inherited from
removedMessageCount
readonlyremovedMessageCount:number
Defined in: src/core/agent/window/types.ts:157
How many messages left the window.
Inherited from
WindowRecord.removedMessageCount
removedStageIds
readonlyremovedStageIds: readonlystring[]
Defined in: src/core/agent/window/types.ts:155
runtimeStageIds of the stages that appended the messages that left.
Inherited from
strategy
readonlystrategy:string
Defined in: src/core/agent/window/types.ts:151
WindowStrategy.name of the strategy that decided — 'summarize-oldest',
'sliding-window', 'token-budget', or your own. Narrow on it.
Inherited from
summarizerSkipped?
readonlyoptionalsummarizerSkipped?:boolean
Defined in: src/core/agent/window/types.ts:255
Present and true when the summarizer was deliberately NOT called this
iteration (8.14.0): this exact span had already come back
'replacement-not-smaller', and the same span through the same summarizer
gives the same answer. No call, so no summarizerTokens and no cost tick.
It is recorded rather than left out because a decision not to spend is still a decision. A record with this flag and one without are different facts, and a reader adding up an agent's fold attempts needs to see both.
summarizerTokens?
readonlyoptionalsummarizerTokens?:object
Defined in: src/core/agent/window/types.ts:244
What the summarizer call itself cost, when it reported usage.
input
readonlyinput:number
output
readonlyoutput:number
summaryChars
readonlysummaryChars:number
Defined in: src/core/agent/window/types.ts:242
Length of the summary text the summarizer produced (0 when none).
thresholdTokens
readonlythresholdTokens:number
Defined in: src/core/agent/window/types.ts:238
The budget it was compared against.
windowCharsAfter
readonlywindowCharsAfter:number
Defined in: src/core/agent/window/types.ts:160
Inherited from
windowCharsBefore
readonlywindowCharsBefore:number
Defined in: src/core/agent/window/types.ts:159
Window size in chars before / after this visit. Exact, and not tokens.
