Skip to content

0.8.0

Choose a tag to compare

@jonaslsaa jonaslsaa released this 08 Oct 22:41
· 19 commits to main since this release
3615e74

OptChat 0.8.0 is the biggest release so far. It brings the memory engine in line with Victor Taelin's revised OptChat recipe, runs on Windows, remembers images, imports Pi and OMP sessions, works headless, and imports about twice as fast. Every change below was measured on real memories before it shipped: the studies are linked from Epic #101.

The revised recipe (Epic #101)

Victor revised his OptChat gist on Oct 7. We went through it line by line and adopted everything that proved itself in a blind A/B on frozen copies of real profiles.

  • Summaries keep more of what matters (#112). The compactor now runs Victor's whole revised compaction prompt. Blind Opus grading over 88 summaries: work memory +4.3 ± 1.3 (12 wins, 1 loss), personal +1.3 ± 1.4, same cost. We also tested giving the compactor your AGENTS.md: no gain and 7× more invented facts, so it stays blind to your instructions on purpose.
  • Turns read the view from the cache (#96, @aaaxn). The view is merged in batches and remembered in view.json, so the prompt prefix stays byte-stable between turns. Cache hit rate on a live profile: 29% → 96% personal, 41% → 92% work.
  • Compactions get their own smaller view and run up to 8 at once (#97, @aaaxn; #106, #108). A summary starts as soon as fewer than 8 lines before it are unbuilt, with gaps shown as placeholders. A 20-message burst now settles in about 10 s instead of 42 s, at a quality cost of 0.27 points per summary (vs 0.8 without placeholders). A turn also goes on once every summary it waited for has failed, instead of hanging forever.
  • The view is the truth (#102). The agent's prompt now carries the revised recipe's memory rule: find the latest mention in the view and zoom before any other source.
  • Subagent reports are their own memory kind, work: (#103), delivered as each one finishes. Grouped delivery is still there as a setting, now off by default for new profiles (existing profiles keep what they have).
  • Huge messages are read in pages (#93, #117). zoom(id, 1) on a 100 KB tool result used to lose its middle; now it pages 25,000 characters at a time, and tells the agent when it pages a message that would have fit in one zoom. Chosen over splitting messages on write by A/B: 26/32 vs 19/32 questions answered.

The full list of where we still deviate from the gist, and the numbers behind each choice, is in this comment.

Windows (#88, @bobneumann)

OptChat runs on Windows: profile locks over named pipes, ZIP import through the built-in tar.exe, and a windows CI job on every PR. Live-tested on a real Windows Server runner (#115, #116, #119, #122 give maintainers an SSH-able Windows machine on demand). The run found and fixed a real bug in re-imports on the way. Image paste, the memory browser and spaced paths are not yet tested on a Windows desktop: reports welcome. Closes #85.

Along with it, from @lmvdz: a half-created profile is cleaned up so the name can be retried (#120), and new tests for flush failure and lock recovery after the owner is killed (#121).

Images in memory (#113)

Pasted screenshots and image tool results used to become the text "[image attachment]" in memory. They are now stored once under images/<hash> (resized to at most 2048 px / 2 MB) and zoom(id, 1) returns the actual picture, so the agent can look at a screenshot from last week.

Import Pi and OMP sessions (#111, started by @netroms in #74)

A new import source reads Pi's own sessions and OMP's, which share a format. Off-path branches are tagged [alternate branch], /skill: prompts are kept, and !!cmd / $$code (hidden from the model when typed) are left out.

Headless Pi (#99, @ahlner; #110)

pi -p and RPC sessions no longer drop the prompt silently. A headless Pi never picks or creates a profile on its own; with a bound profile it joins the Pi that already has it open and prints the final reply, controlled by --optchat-connect auto|join|off.

Faster imports (#114)

Imports now summarize 8 messages at once with the same ahead rule as live chat. 228 messages: 356 s → 152 s, at the same cost.

Smaller things

  • Delete a subagent from the Agents page: press d twice on its row, running ones are stopped first (#123, @aaaxn). A connected window whose run is deleted is told so instead of waiting forever.
  • "Waiting for OptChat summaries…" shows the compactor's last error instead of a bare spinner (#91, reported by @tfcace).
  • /reload no longer re-logs a message that was queued, taken back with Esc, and sent again (#109).
  • A shown custom message counts as a user message, as in Pi (#87, @aaaxn).
  • The repo now protects main, release tags and npm publishing (#90).

Known issue

Running pi-interactive-subagents alongside OptChat can leave its subagent tool with a stale context after an OptChat spawn (#92, reported by @alexeyche). The cause is in that extension; the fix is open upstream as maplezzk/pi-extensions#234.

Upgrading

  • Restart or /reload every Pi window after updating.
  • The first turn on each profile is cold once: the view cache (view.json) is built, then turns hit the cache.
  • The compactor prompt changed, so new summaries read a little differently from old ones. Old summaries are untouched.
  • New profiles get Group subagent reports off; flip it in /optchat settings if you preferred one combined report.

218 tests. Thanks to @aaaxn, @bobneumann, @lmvdz, @ahlner, @netroms, @tfcace and @alexeyche, and to Victor Taelin for the recipe.