Skip to content

v0.1.2

Choose a tag to compare

@Tyan66666 Tyan66666 released this 14 Aug 06:19
· 20 commits to main since this release

What changed

Fix: compress failed with no assigned ref when a range edge landed on a multi-tool-call assistant message.

Multi-tool-call assistant messages project to ${seq}#${callId} CoreMessage ids, so they carry no bare-${seq} ref — compress could never resolve them as range edges. This hit live sessions exactly where the nudge range table placed a multi-call message on a boundary.

Fix (two planes)

  • region.tsresolveSurfaceRange now requires a boundary to be both tool-pairing-balanced and plain-ref (hasPlainRef). Multi-call edges shift inward to the nearest clean cut (shrink-first), or expand outward to the enclosing clean pair when shrinking collapses.
  • tools.tshandleCompress balances edges through resolveSurfaceRange before resolving refs.

Live verification (closed loop)

  • compress 106754..143714 failed before the fix (no assigned ref)
  • compress 106756..143714 → block 99597a3a, 80 messages, ~24,567 tokens reclaimed; search_context + acp_status confirm the durable loop
  • Session ledger: 4 blocks, ~183K tokens compressed total

Tests

32/32 green (typecheck + build clean): new appendMultiToolCall fixture, region-level boundary tests, end-to-end compress tests (lone multi-call boundary expands to its round; multi-call messages inside a clean range shadow normally; nudge range-table edges compress successfully).

Commits: ea24a7e (fix) · 24959ab (release v0.1.2)