docs: fix auto-compact description in ARCHITECTURE.md

Auto-compact does exist: triggers automatically at 75% of the model's
context length (128k default), and also manually via /compact.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Levi Neely 2026-04-25 11:19:53 +02:00
parent ead4678ee5
commit 5326de7b46
1 changed files with 7 additions and 6 deletions

View File

@ -148,13 +148,14 @@ core := agent.NewAgentCore(agent.AgentCoreConfig{
## Session and Context
`agent.Session` owns the message history as a flat `[]backend.Message` slice. There is
no rolling window or automatic eviction — the history grows unboundedly until compaction
is explicitly triggered.
`agent.Session` owns the message history as a flat `[]backend.Message` slice. There is no rolling window or automatic eviction — the history grows until compaction
runs.
**Compaction** is invoked via `/compact` (from `s/sh` or the `ctl` file) or by the
agent itself. It makes a single LLM call to summarize the conversation, then replaces
the history with a compact representation:
**Compaction** runs automatically before a turn when the estimated token count reaches
75% of the model's context length (defaulting to 128k if the backend doesn't report
one). It can also be triggered manually via `/compact` (from `s/sh` or the `ctl` file).
Either way it makes a single LLM call to summarize the conversation, then replaces the
history with a compact representation:
1. All `system` messages are preserved verbatim.
2. Recent `user` messages are preserved up to a ~20 000-token budget (newest first,