Compact
A context compaction operation provided by tools such as Claude Code that summarizes historical conversation into a shorter summary to free up window space, though it is a form of lossy compression.
Timeline (last 90 days)
In long conversations, entering the Compact instruction lets Claude summarize important decisions and discard noise to alleviate context congestion.
When exploration goes down a wrong branch, the Rewind command should be used to truncate the trailing invalid turns in order to preserve the prefix cache, rather than using the Compact command, which rewrites history and destroys the cache.
The Rewind command rather than the Compact command should be used to handle erroneous branches, as Rewind only truncates the trailing invalid turns while preserving all preceding cache, with zero additional recalculation cost.
All Facts (4)
Context Mode与Claude Code自带的Compact功能是互补关系:Compact做语义摘要压缩工具定义,Context Mode做索引压缩工具输出
85%UnverifiedIn long conversations, entering the Compact instruction lets Claude summarize important decisions and discard noise to alleviate context congestion.
50%UnverifiedWhen exploration goes down a wrong branch, the Rewind command should be used to truncate the trailing invalid turns in order to preserve the prefix cache, rather than using the Compact command, which rewrites history and destroys the cache.
50%UnverifiedThe Rewind command rather than the Compact command should be used to handle erroneous branches, as Rewind only truncates the trailing invalid turns while preserving all preceding cache, with zero additional recalculation cost.
50%