[RFC/关键加固] 在 Claude Cowork 不能主动压缩的情况下,需要升级为「单次消费型状态机 (One-Shot Immunity)」以支持多轮自愈并杜绝 357k 漏网穿透 / Upgrade Post-Compaction Immunity to One-Shot State Machine (Follow-up to #3563)

作者: cubelikeplayDaniel创建于 2026年9月30日更新于 2026年9月30日

[Client initiates request] │ ┌─────────────┴─────────────┐ ▼ ▼ 【Split A: compression summary request】 【Normal business request (with or without historical summary)】 (x-stainless-helper / Prompt) │ │ ▼

  1. Unconditional forwarding Check whether the session state machine has a valid one-time token?
  2. Issue a token for the session: │ session.post_compact_token = true ├─── [Yes (token exists and has not expired)] ───► 1. Single forwarding (direct to 1M window) session.token_time = now() │ 2. 【Core】Immediately revoke the token! │ session.post_compact_token = false │ └─── [No (no token or has been revoked)]

…

内容来源: lbjlaq/Antigravity-Manager