ObserveCompactionContext
Defined in: agent/hooks.ts:340
Context provided when context compaction occurs. Read-only observation point.
Properties
Section titled “Properties”event:
CompactionEvent
Defined in: agent/hooks.ts:344
Details of the compaction event
iteration
Section titled “iteration”iteration:
number
Defined in: agent/hooks.ts:342
Agent iteration when compaction occurred
logger
Section titled “logger”logger:
Logger<ILogObj>
Defined in: agent/hooks.ts:348
Logger instance
stats:
CompactionStats
Defined in: agent/hooks.ts:346
Cumulative compaction statistics
subagentContext?
Section titled “subagentContext?”
optionalsubagentContext:SubagentContext
Defined in: agent/hooks.ts:350
Present when event is from a subagent (undefined for top-level agent)