v0.2.17
LatestThe long run.
One theme: a run that has to keep working after its context is cut. Built as one measured slice per hypothesis on a twin-lane battery of real Quick Search work (Opus 5, real MCP tools, 23 pinned prompts, four batteries) plus an offline recall eval that re-runs the engine's own compaction on archived production transcripts. The finding that shaped it: a compaction summary is capacity-bound — a first-generation summary answers about one grounded question in four about the turns it replaced, whatever writes it — so the release invests in recovery and in telling the agent what it already did, not in longer prose. At a 60k ceiling 0.2.16 spent 62 turns and $9.29 on a 5-person shortlist, re-running the same searches after every cut; 0.2.17 finishes it in 11 turns for $0.85, and 92 of 92 candidate runs finished across the four batteries. Schema migration v16 (the recall index), one-way like v15: snapshot before upgrading.
- Indexed recall.
recallruns on a full-text index over the message table: any query word qualifies a row, rare words outrank common ones, whole-phrase hits first, case and Latin diacritics folded, prefix matching. On identical questions drawn from production compactions the recovery arm went from 21% to 52% correct, and to 72% on the facts the agent itself had written down. - Anchor index and appendix. The compaction audit harvests identifiers by class with a budget each — URLs, emails, slugs, recurring proper names from the agent's own text, years, numbers — and appends what the summarizer dropped, defanged and bounded. Measured on the battery: the summarizer dropped 30% of anchors and the appendix carried 97% of those back, against 30 of 30 lost per compaction before.
- Calls ledger and recovery footer. Every summary lists the tool calls it compacted (builtin arguments deduped newest first, MCP tools by name and count) and ends with one line naming
recall. This is the cue that makes agents recover instead of re-run: recall calls went from zero in 68 runs to 9 to 12 per 23-run battery. - The reload is a number.
model.callcarriesturns_since_compactionand no longer suppressescache_shortfall_tokenson the first call after a cut, so the re-read a compaction costs is one column: 20 to 30k tokens per cut at a 200k ceiling. - History digest.
history_n,history_hashandhistory_prefix_hashsplit 'we mutated history' from 'we placed marks badly'. Measured byte-stable on 574 of 574 comparable turns, which retires that theory of the open cache defect. - Anthropic cache diagnosis, opt-in.
DELTA_CACHE_DIAGNOSIS=1threads the previous response id through the main lane and lands the provider's verdict ascache_miss_reason. The onlymessages_changedverdicts in 599 turns were the compaction reloads. - Shadow loop guard.
loop.repeatis emitted when the same executed tool, arguments and result recur three times in a row. Observation only.
- Compaction events say more.
generation,summary_finish_reason,summary_chars(the persisted body) andidentifiers_appended, so the difference between what the summarizer dropped and what the engine put back is one subtraction. A length-stopped summary is retried once and the better candidate kept. - What was tried and not shipped. A retained tail proportional to the ceiling thrashed a heavy run (92 turns, 55 compactions where the flat tail took 18 and 11) and is reverted; a stronger summarizer model and an entity-table prompt both replayed to the same closed-book recall as the production Haiku prompt, so the utility lane is unchanged.
- Upgrade notes. Any v15 database (0.2.13 through 0.2.16) migrates directly to v16 at boot; stop the old daemon before the new one opens the volume, and snapshot first because v16 will not open under an older binary. Known trap on any version: a volume restore rewinds the telemetry event sequence below what a deduping collector already holds, and every later event is silently dropped. Advance the
eventssequence past the collector's last id before booting a restored volume. Operator recipes:docs/upgrade-0.2.17.md.