diff --git a/docs/memory.md b/docs/memory.md index cf724d85..5956007c 100644 --- a/docs/memory.md +++ b/docs/memory.md @@ -69,3 +69,14 @@ Environment variables: - `CLIPROXY_TODO_ENABLED` (default: enabled) - `CLIPROXY_TODO_MAX_CHARS` (default: `4000`) + +## Prompt-cache friendly packing + +To preserve stable prompt prefixes for long sessions, CLIProxyAPI packs session state into the **last user message** (as a prepended block), instead of mutating `instructions` / system messages. + +Packed block format: + +- `` + - `` from `pinned.md` + - `` from `summary.md` + - `` from `todo.md`