Skip to content

v0.11.0 — lossless context rollover across Claude Code, Codex, Gemini CLI, OpenCode

Latest

Choose a tag to compare

@2akouwu 2akouwu released this 04 Sep 18:13
· 13 commits to main since this release

Lossless context rollover across four agent CLIs

The ledger already keeps grounded facts across a context reset. This release decides when to reset and makes the reset lossless on the agent CLIs people actually use — Claude Code, Codex CLI, Gemini CLI and OpenCode.

Built-in compaction rewrites the conversation into a model-written summary and keeps going, so the model's own mistakes ride forward as if they were state — and it visibly gets dumber. Instead, the session is replaced:

  • Guard at each harness's "turn finished" hook (Claude Code / Codex Stop, Gemini AfterAgent, OpenCode session.idle) reads the live context from that harness's own transcript. At the threshold — or when the model runs reverify rollover request — it blocks one stop and asks for a hand-off file with a fixed shape (task, decisions, done/not-done, verbatim identifiers, verification status, next step), labelled UNVERIFIED. Nothing is summarized in the conversation.
  • Receipt, fail closed. Only after the file is verified rewritten and well-formed is a receipt issued, carrying the transcript's SHA-256 and the user's verbatim first and latest messages. A missing or malformed hand-off means no receipt and a re-arm further up.
  • Fresh session from the launcher (any CLI), Gemini's in-process clearContext, or the OpenCode plugin — opening on the hand-off file and the original request, verbatim, so objective A can't drift into B. The old transcript stays on disk as an audit trail and is never resumed.

One command wires it for every CLI on PATH and turns built-in compaction off (backups kept):

reverify rollover install
reverify rollover doctor        # what's wired, whether the hook commands still resolve
reverify rollover codex --full-auto    # or run any CLI through the launcher

For a small-window model the threshold is capped at 75% of the model's context window when the harness records it (Codex), so it never hits the wall with native compaction off.

Honest limits. The full loop (block → hand-off → receipt → fresh session) is verified end-to-end with a real model on Claude Code; Codex and Gemini's hook mechanics are each reproduced and verified on Windows, but their full real-model loop was not run here (account tier limits on the test machine). Hosted/bridge sessions that nothing can end keep the guard and the hand-off file; the new session is opened by the user. Pure Python, zero dependencies; hooks fail open, the rollover fails closed.

Also in this release: exebench claim kind (#11, opt-in native re-execution of a candidate C program against recorded I/O), the multi-prior hallucination scorecard (#10), and the rollover controller (reverify orchestrate) for goal-driven fresh-context sessions.

Full notes: CHANGELOG. Built and attested (SLSA provenance) in CI; PyPI publish lands when the project's Trusted Publisher is enabled.