Skip to content

v0.21.0

@AAG81 AAG81 tagged this 24 Oct 07:38
New agent::compaction module porting opencode's compaction mechanism
(anomalyco/opencode @ b64cc80) per owner order 2026-10-24:
- /compact task + opt-in [compaction] auto gate (default OFF, unknown
  window never auto-fires, fail-open on error)
- structured-template summary with heading validation + one nudge retry,
  update-mode for chained compactions (newer-history-wins)
- newest keep=15000 tokens kept verbatim; wrapper splices as one
  <conversation-checkpoint> user message; history append-only in
  checkpoints (nothing destroyed)
- text-flatten shrink ladder (oldest-first, newest never omitted) +
  85/70/50/35 re-aim; i64-signed deltas (usize underflow trap avoided)
- estimator: umf cl100k primary, CHARS-based chars/4 fallback (never
  bytes), ceiling window − max(15%, 16k) — opencode constants
- pin-aware limit_history_keeping_checkpoint (wrapper survives trims)

ROOT CAUSE (the gap): abk's only history control was the lossy
execution.max_history=20 silent drop — long sessions lost context with
no summary.

GATES: compaction suite 19/19; workspace suite with
THQ_IT_PDT_BIN: 298 passed lib (baseline 279 + 19 new), 10 lib failures
PRE-EXISTING on clean tree (stash-verified: 279/10 identical baseline);
documentdb/extension environmental per standing doctrine.

PINS: none changed (umf 0.3 unchanged). DEPLOY: default-off; flip
[compaction].auto or use /compact — no behavior change without it.
CRATES.IO: single-crate publish (abk is external-only). dead-tag: none.
Assets 2
Loading