Skip to content

v0.32.0

Choose a tag to compare

@github-actions github-actions released this 11 Jul 21:36
· 2066 commits to master since this release

v0.32.0

The Pi release: a transform-performance overhaul measured on real long sessions, /clone state inheritance, and a batch of cache-stability and correctness fixes from two blind audit rounds. Plus a compact memory format that trims the token cost of injected project memory for everyone, and Claude Code / Codex session support on the dashboard's cache page.

Pi

Transform performance overhaul (#224)

Three optimization rounds, verified byte-identical against 62 real session files at every step:

  • The historian trigger no longer resolves the full session boundary before its cheap gate — the most expensive per-pass cost on long historian-enabled sessions.
  • Already-compacted history is trimmed before conversion and tagging instead of after, and tag loading is scoped to the live tail.
  • Stable messages reuse their tag identities and token counts across passes instead of re-deriving them; branch entries parse incrementally (only new entries per pass) instead of re-parsing the whole session file.
    On the largest real-world test session (27k entries, ~1,100 live messages), a steady-state pass dropped from ~1s to under 100ms warm. Sessions at the scale reported in #224 (5,700+ messages) see the reported multi-second transforms fall to a few hundred milliseconds.

/clone inherits Magic Context state (#225)

/clone previously produced a session where Magic Context's summaries, tags, and compaction state didn't exist — the clone lost its compacted history and could overflow on the first message where the original fit. Clones now inherit the full state at fork time (Pi preserves entry ids across clones, so the migration is exact): a cloned session continues with the same summarized history, tag numbers, and reduction state as the original. As a stopgap on older versions, /ctx-wrapup in a clone re-summarizes the full history — that path was also verified to recover everything behind the compaction boundary and to resume cleanly if interrupted.

Correctness batch from a blind audit round

An adversarial audit of the Pi lane surfaced failure-path bugs where an error mid-pass could ship bytes whose replay state never persisted — each one a potential cache bust on the next pass. All fixed with fault-injection tests:

  • Reasoning clearing rolls back if its watermark write fails (previously: cleared bytes shipped, next pass restored them).
  • Placeholder stripping persists before splicing (previously: a failed write meant a message vanished for one pass and returned the next).
  • The stable-id scheme cutover only commits after the pass completes (previously: a failed pass could strand previously-stripped messages back into the prompt).
  • A cross-process race in fallback-tag adoption could renumber a tag; collisions now preserve the number already on the wire.
  • The mid-turn release valve only unlocks on genuine user messages (synthetic user-shaped messages no longer let mutations land mid-turn).
  • Pi now strips processed images the same way OpenCode does: pasted screenshots the assistant has already handled are replaced with a placeholder once aged, instead of riding every subsequent request as base64. Frozen-id replay keeps it cache-stable, and clones inherit the stripped set.

Status lines no longer reach the model

Progress notices (/ctx-embed drains, wrapup progress, config warnings) were delivered through a path that made them model-visible — the model would occasionally reply "Noted." to a background embedding notice mid-turn, costing tokens and transcript noise. Status entries now use Pi's display-only entry mechanism and structurally cannot enter model context. On Pi 0.80.2 (which lacks the entry renderer API) statuses are persisted but invisible; 0.80.3+ renders them normally.

Everyone

A cache-stability fix for pressure folds

A fold pass could serialize one assistant message near the compaction boundary differently than the surrounding passes — reasoning strips ran before tool reclamation changed the message topology, while the next pass ran them after. The result was a second, unnecessary cache bust (~half the prompt re-cached) one pass after a designed fold. Representation strips now run once, after all mutations, on every pass — a fold and the pass after it serialize byte-identical prefixes.

Leaner history compartments

Compartments in <session-history> now render as markdown headings (## 62704-62776 · 2026-06-08→09 · Title) instead of XML tags with attributes. On a large session's history this saves ~15% of the whole block (15k tokens on our biggest real session), applies retroactively to all stored compartments, and reads better. ctx_expand guidance and tool descriptions updated to match.

Compact project memory format

The injected <project-memory> block now renders memories as #id: fact lines grouped under one category tag, instead of one XML element with attributes per memory — roughly 20 tokens saved per memory, which adds up on mature projects with large memory pools. Memory ids remain visible so ctx_memory actions keep working unchanged, and importance scoring moved off the wire entirely (it still orders what survives the budget) — which also makes background memory re-classification cache-neutral.

Compartment dates restored

The history compartments in <session-history> carry their start-date/end-date attributes again when temporal awareness is on (lost in the v2 decay renderer) — so the model can reason about when past work actually happened.

Smart drops actually enabled

A config-mapping bug meant the smart_drops flag (superseded-edit compression, spent control-plane drops) was silently ignored on OpenCode since its release — the transform never saw the setting. If you enabled it and wondered why nothing happened: it works now.

Dashboard

(Ships as dashboard v0.10.0 alongside this release.)

  • Claude Code and Codex sessions on the cache page: sessions from both harnesses appear in Cache Diagnostics with full cache hit/write timelines. Sessions managed by CortexKit context management are shown by default with a "Managed" badge; a toggle reveals unmanaged ones.
  • Pi models in the shared config editor (#226): the model pickers now merge OpenCode and Pi model lists (with provider prefixes normalized), and you can always type a model id directly even when a discovered list is present — discovery is never exhaustive. Thanks @mkurt for the precise diagnosis.
  • Bug-report form now includes Pi and Dashboard as client options.

Also fixed

  • A Bun is not defined boot error on OpenCode Desktop from the RPC server's WebSocket path.
  • Project-identity resolution no longer stalls passes on slow/dead git under load (last-known-good caching + realpath walks for symlinked .git).
  • ctx_search result anchors (@msg N) only render for the current session, so stale anchors can't point at the wrong conversation.
  • Doctor's ONNX runtime probe runs in a subprocess so a broken native binding can't crash the host process.