Skip to content

v0.31.0

Choose a tag to compare

@github-actions github-actions released this 06 Jul 20:41
· 2381 commits to master since this release

v0.31.0

Feature release: a new /ctx-wrapup command for compacting history on demand, notes in ctx_search, sturdier project identity on flaky git setups, and a simplified reduction configuration.

New

/ctx-wrapup: compact older history on demand

/ctx-wrapup [messages_to_keep] runs the historian forward over your live history right away, keeping only the newest N raw messages (default 20, counting every message: yours, the assistant's, and tool results). Everything older is summarized into compartments. The cut never splits an in-flight tool exchange and prefers to land on one of your messages.

Use it before switching from a large-context model to a smaller one: the compacted history is queued and materializes on your next message, and a model switch applies it at no extra cost. If you want it applied immediately instead, run /ctx-flush first.

While it runs, OpenCode's TUI shows a live Wrapup progress bar in the sidebar; OpenCode Desktop posts a start notice and the result in the chat; Pi reports per-chunk status messages. /ctx-recomp and /ctx-session-upgrade wait their turn while a wrapup is active (and the other way around), including across multiple processes sharing the same database.

ctx_search now covers your notes

Notes taken with ctx_note (including smart notes) are now a search source alongside memories, message history, git commits, and compartments. Results show the note's status and age; notes from the current session carry a @msg N anchor the agent can expand for surrounding context.

Improved

Project identity survives flaky git

Project-scoped memory is keyed by a git-derived project identity. Several failure modes could previously split or flip that identity:

  • A git timeout on a slow disk, or a dubious ownership refusal, disabled Magic Context for the session or split memory under a directory-based fallback identity. Both now fall back gracefully, and once a session has resolved its real git identity, transient git failures keep using it instead of flipping.
  • Working in a subdirectory during a transient failure now reuses the repository's identity rather than minting a separate one.
  • Symlinked checkouts are now detected as git repositories.
  • dubious ownership produces a one-time warning with the exact git config --global --add safe.directory fix.

Doctor checks the local embedding runtime more safely

The CLI doctor now probes whether onnxruntime-node actually loads (not just whether its files exist), and runs that probe in a separate process so a broken native binding cannot crash the doctor itself.

Changed

ctx_reduce_enabled removed

Agent-controlled reduction is now always on; the ctx_reduce_enabled setting is gone. If your config still contains it, the key is ignored harmlessly. Caveman text compression, which was previously tied to that flag, is now controlled solely by caveman_text_compression.enabled (still off by default, and never applied to subagents).

Fixes

  • The TUI sidebar no longer shows a Facts row (facts were folded into project memories in v2; the row was always 0).
  • Pi: disabling caveman_text_compression now also stops replaying compression persisted by earlier passes.
  • Pi: a transient search timeout no longer suppresses automatic search hints for the rest of the turn.
  • A number of internal hardening fixes around the new wrapup command's concurrency (durable run marker with self-expiry, crash recovery on restart, and safe interleaving with the automatic historian), prompt-cache stability under multi-process contention, and the compaction-marker advance on Pi.