Skip to content
所有標籤

#context-management

2 篇文章

OMP append-only context:為什麼 sync 對話要算 byte-stable prefix?Anthropic/DeepSeek 的 KV cache 怎麼被它保護的

omp 用 StablePrefix 凍結 system prompt + tool specs,用 AppendOnlyLog 讓 messages 只增不改,配合 digest-based 的 longestStablePrefix 算法,在 prune/shake/steering 重寫歷史時,只重送 divergence point 之後的尾巴。這讓 Anthropic/DeepSeek 的 prompt cache 命中率最大化,解決了舊版每輪強制 ~40k token re-prefill 的問題(issue #3406)。

OMP 四種 compaction 策略:context-full / snapcompact / branch summary / shake —— 各解決什麼失敗模式、怎麼切換

omp 不只有一種 compaction:context-full 走 LLM 摘要、可疊代、失敗對半重切預算;snapcompact 不呼叫 LLM,把歷史壓成 PNG 讓 vision model 讀,解決無 API key / 低延遲 / 視覺模型便宜場景;branch summary 在 `/tree` 切分支時摘要被離開的段落;shake 純機械式把 tool-result 大段文字換成 placeholder,給 summary 太重、prune 不夠的緊急手動場景。四種策略分工明確,由 session maintenance 自動編排或使用者手動觸發。