[KongchangAI]
Concept

compaction

Compaction is a data or memory management technique in computer science that reorganizes scattered or fragmented data and storage space to improve space utilization and access efficiency. It is widely applied in memory management, database storage engines, file systems, and garbage collection mechanisms, eliminating fragmentation to optimize system performance. In the context of context-window management, the term also refers to compressing and summarizing long sequences of information to support extended task processing.

Core Facts

Timeline (last 90 days)

Oct 18

A summary is itself a model generation and introduces new risk of distortion, so summaries should retain verifiable hard information as much as possible (file paths, error codes, confirmed conclusions) and compress narrative content.

Unverified50%
Oct 18

Compaction is lossy, and summaries of summaries gradually drift, so as much detailed information as possible should be moved out of the window into permanent files and pulled back only when needed.

Unverified50%
Oct 17

When a summary becomes the source of truth and the summary is wrong, the agent will not report uncertainty but will confidently argue with you about work you watched it complete with your own eyes.

Unverified50%
Oct 12

To evaluate whether compression is beneficial or whether switching to a smaller model makes sense, one cannot look only at the drop in Token count per request, but must fix the source input and success criteria while comparing the final task result with the total usage of the entire task (including additional work such as summary generation).

Unverified50%
Oct 10

Common methods for controlling the cost of long tasks are caching and compaction, where the former reuses already-processed context and the latter streamlines the history.

Unverified50%
Oct 6

The compaction mechanism frees up context space by summarizing and compressing conversation history, but it is essentially a lossy operation that discards a large amount of detail that might otherwise have been useful.

Verified65%
Oct 4

Compaction refers to the framework automatically condensing earlier conversations into summaries or removing redundant content to free up space when session messages exceed the model's context window limit.

Verified75%
Oct 4

Conversation history auto-compaction summarizes earlier conversation history and retains only key context, thereby reducing the token cost of each request and alleviating context window limitations.

Verified75%
Oct 4

Sub-agents have had automatic compaction enabled to improve context management in long sessions.

Unverified50%
Oct 4

Automatic compaction frees up context space by summarizing or trimming historical messages, which can reduce the cost of API calls billed per token.

Unverified50%

3 more timeline events

All Facts (13)

Verified

Compaction refers to the framework automatically condensing earlier conversations into summaries or removing redundant content to free up space when session messages exceed the model's context window limit.

75%
Verified

Conversation history auto-compaction summarizes earlier conversation history and retains only key context, thereby reducing the token cost of each request and alleviating context window limitations.

75%
Verified

The compaction mechanism frees up context space by summarizing and compressing conversation history, but it is essentially a lossy operation that discards a large amount of detail that might otherwise have been useful.

65%
Verified

Compaction is a technique in which, when a thread accumulates to a certain length, the system distills the conversation history into a more compact summary rather than simply truncating it.

65%
Unverified

A summary is itself a model generation and introduces new risk of distortion, so summaries should retain verifiable hard information as much as possible (file paths, error codes, confirmed conclusions) and compress narrative content.

50%
Unverified

Compaction is lossy, and summaries of summaries gradually drift, so as much detailed information as possible should be moved out of the window into permanent files and pulled back only when needed.

50%
Unverified

When a summary becomes the source of truth and the summary is wrong, the agent will not report uncertainty but will confidently argue with you about work you watched it complete with your own eyes.

50%
Unverified

To evaluate whether compression is beneficial or whether switching to a smaller model makes sense, one cannot look only at the drop in Token count per request, but must fix the source input and success criteria while comparing the final task result with the total usage of the entire task (including additional work such as summary generation).

50%
Unverified

Common methods for controlling the cost of long tasks are caching and compaction, where the former reuses already-processed context and the latter streamlines the history.

50%
Unverified

Sub-agents have had automatic compaction enabled to improve context management in long sessions.

50%
Unverified

Automatic compaction frees up context space by summarizing or trimming historical messages, which can reduce the cost of API calls billed per token.

50%
Unverified

Zed v1.22.0 officially enabled automatic compaction for sub-agents to control context bloat in long-running tasks.

50%
Unverified

递归摘要策略对已有摘要再次摘要,形成金字塔式信息压缩层次,在信息密度和计算成本间取得不同平衡点

50%

Source Articles