Claude Code 重度用户终于有了优雅的上下文管理方案——保留早期关键决策,压缩后期冗余对话,做复杂项目的开发者建议立刻试试。
开发者 svpino 分享了一个 Claude Code 中被低估的技巧:“Summarize from here”,用于处理不断增长的上下文。传统方法使用 /compact 会压缩整个会话,但该技巧允许用户通过 Esc+Esc 或 /rewind 打开检查点菜单,选择一个关键检查点后,保留该点之前的重要上下文(如规格、决策、约束),而将之后的内容压缩为简洁摘要。这有效去除了噪音,保留了有价值信息,特别适合长会话场景。
You should try "Summarize from here" in Claude Cod…
You should try "Summarize from here" in Claude Code.
I think this is an underrated trick to deal with your ever-growing context.
Basically, instead of using /compact or letting Claude Code to compact your entire session, do the following:
1. Hit Esc+Esc (or type /rewind). This opens the checkpoint menu with every checkpoint Claude created during the session.
2. Pick a checkpoint that came after the context you'd like to keep.
3. Select "Summarize from here."
Everything before that checkpoint will stay exactly as it was. Everything after will get collapsed into a compact summary.
You keep the valuable early context (specs, decisions, constraints) and get rid of the crappy noise.