ConversationManagerReduceOptions
type ConversationManagerReduceOptions = { agent: LocalAgent; model: Model; error?: ContextWindowOverflowError;};Defined in: src/conversation-manager/conversation-manager.ts:31
Options passed to ConversationManager.reduce.
When error is set, this is a reactive overflow recovery call — the implementation
MUST remove enough history for the next model call to succeed.
When error is undefined, this is a proactive compression call — best-effort reduction
to avoid hitting the context window limit.
Properties
Section titled “Properties”agent: LocalAgent;Defined in: src/conversation-manager/conversation-manager.ts:35
The agent instance. Mutate agent.messages in place to reduce history.
model: Model;Defined in: src/conversation-manager/conversation-manager.ts:41
The model instance. Used by conversation managers that perform model-based reduction (e.g. summarization).
error?
Section titled “error?”optional error?: ContextWindowOverflowError;Defined in: src/conversation-manager/conversation-manager.ts:53
The ContextWindowOverflowError that triggered this call, or undefined
for proactive compression calls.
When set, reduce MUST remove enough history for the next model call to succeed,
or this error will propagate out of the agent loop uncaught.
When undefined, reduce is best-effort — errors are swallowed and the model call
proceeds regardless.