← All serials
Serial · 2 reports

Context Compaction

What must survive when an agent can no longer carry its whole history?

Earliest report · Latest report
Start with the first report → See all reports ↓

Overview

When an agent shortens its history, the next response still has to advance the same task. A summary can preserve many facts while losing the condition that determines which action is right. This pair asks what a compressed handoff must retain and how to inspect whether an implementation actually carries it forward.

The first report develops the continuation criterion: preserve the current request, constraints, completed work and reasons to recover displaced detail. The second follows that question into checkpoints, retained messages, cleared results and the caller that builds the next model request. Read the principle before the code, then use the code to ask exactly what survives the handoff.

The enquiry at a glance

A smaller input succeeds when the task can still continue

01

Preserve the next action

Retain the task, permissions, progress and reasons to recover detail.

02

Inspect the next request

Follow saved state and omitted detail into real callers.

The second report follows the first report’s preservation question into concrete implementation paths.

Reading order

A recommended path through the enquiry. Each report explains its part; continuation links preserve the original branches.

  1. Preserve the task across compression
    What an Agent Must Keep When It Compresses Its History

    Defines the continuation test: keep what determines the next action and make displaced detail recoverable when it matters.

    Start here
  2. Follow the checkpoint into code
    How memory compaction changes an agent’s next request

    Examines how actual implementations rebuild the next request, making the preservation question inspectable at the caller boundary.

Further reading

Background What Stops Working Before the Million-Token Window Runs Out

Examines how advertised capacity differs from task-specific use, for readers who want the broader context-window evidence.