condensate docs
How it works / Condensate

Context windows and memory

Keep a durable history while changing what the model sees next.

Every model call has a finite input budget. A task can keep producing messages, file contents, and tool results long after those inputs fill the available space. Condensate reduces the context sent to the model while preserving the task's durable record.

The log stays. The next model input changes.
Durable history
RequestReadsToolsDecisionsRecent work
Recorded events remain available to inspect.
↓ model-facing projection ↓
Next model input
RequestReadsToolsDecisionsRecent work

Earlier messages compete with new work for a finite context budget.

Conceptual example, not a token measurement. A summary is one reduction strategy; the planner also supports cheaper tool-result reductions.

History and context answer different questions

History answers “What happened?” Context answers “What will the model see on its next call?” A context reduction changes the second without pretending the earlier work never happened.

For example, a large file read may remain useful as historical evidence even when the next model call only needs a receipt and the recent conversation. The agent can read the file again when it needs the details.

Three reduction strategies

The window planner supports three operations, from cheaper reductions to a summary:

OperationWhat changes in the model-facing viewWhy use it?
microcompactClears older dump-class tool resultsLarge read results can often be obtained again
collapseAlso clears older action-class results, retaining receiptsPreserve that an action occurred without carrying its full output
summaryReplaces an older prefix with a summary and keeps recent contextCarry forward a shorter account of earlier work

The actual operation type in packages/engine/src/window/projector.ts is:

export type WindowKind = "microcompact" | "collapse" | "summary";

A summary can invoke a curator model. The other transformations do not inherently require an additional model call.

A checkpoint makes the change inspectable

The window record identifies the cut and retained range. The projector uses these records to build the next model-facing view. A summary is therefore associated with a recorded context transition rather than an unexplained rewrite of the conversation.

To inspect the underlying history, explicitly request history mode. Replace the thread ID before running this read-only request:

export THREAD_ID='replace-with-an-existing-thread-id'
curl -fsS \
  "http://127.0.0.1:4741/threads/$THREAD_ID/tail?after=0&limit=100&history=1"

Page through nextAfter while hasMore is true. History mode reads behind the snapshot shortcut used by ordinary followers.

The engine applies the new view

The native loop applies a revised provider transcript. The Claude adapter uses its window controller and safe root-session frames to integrate fork/resume behavior. Independent Claude subagents have their own contexts; the top-level controller does not automatically compact those too.

The planner also checks available headroom, cuts blocked by open child joins, and repeated-summary thrashing. If a hard-limit fallback must drop messages without obtaining a summary, it explicitly tells the model that happened.

A summary is still a lossy representation

A model may need to reread a file or prior evidence after compaction. Durable storage preserves the material to inspect; it does not make every earlier detail available in the next model call.

Long-term memory is another service. Optional Hindsight-backed recall and retention can carry information across tasks. A deployment can have durable threads and window compaction without enabling that memory service.

Condensate developer documentation · Source ba6d28952e