Files
nexus/wiki/concepts/上下文压缩.md
2026-04-18 00:18:08 +08:00

904 B
Raw Blame History

title, type, tags, last_updated
title type tags last_updated
上下文压缩 concept
ai-agent
memory
context
2026-04-02

Definition

当对话填满 Context Window上下文窗口OpenClaw 将旧消息压缩成摘要以腾出空间给新消息的机制。

Problem

压缩摘要抓住了要点,但丢失了细节——姓名、数字、具体决定,统统消失。

Key Insight

"这是设计使然。上下文窗口是有限的。但默认行为对一切一视同仁,这意味着你精心设计的第三条消息指令,和第七条消息的闲聊得到了相同待遇。"

Solution

启用压缩前的内存刷新Memory Flush在压缩运行前将重要上下文写入磁盘。