Skip to content

v0.7.0

Choose a tag to compare

@ericjuta ericjuta released this 11 Oct 19:51
· 12 commits to main since this release
v0.7.0
12a3464

OptChat can now find what its summaries forgot. Until now the model could only reach old detail by zooming through summary lines, one level per call, and only while some summary still named it. This release adds three retrieval primitives: exact-word chat_search over the original log, zoom depth to open several levels at once, and chat_recall, a System One gate that lets the judge pick the branch at every level down to the message that answers a question. All are on by default.

Signed tag v0.7.0 (commit 12a3464). CI is green on the pinned (18.9.1) and latest SDK cohorts; see "Verified" for the installed-host checks.

New memory tools

Tool What it does Cost
chat_search(text, kind?, limit?, before?) Finds stored messages containing every word of text, case-insensitively, newest first, each with its id, kind and a ~240-byte snippet. Reads the original messages, not summaries, so names, paths, numbers and errors a summary dropped are still found. kind filters (user, talk, tool, echo, note, work), limit is 1–50 (default 10), and before=<id> pages to older hits. Open a hit with zoom(id, 1). No model call
zoom(id, n, depth) Opens depth levels at once (1–4, at most log₂ n): the 2^depth lines under a range. depth 1 is the old zoom(id, n), byte for byte. No model call
chat_recall(question) The judge scores the view lines against the question, the best line at or above --optchat-recall-min (0.5) is opened, and one two-way choice per level ("which half holds the answer?") leads to a single message. Returns the descent path with each step's probability and the message's first 8 KB, with a zoom hint for the rest. ⌈lines/64⌉ + log₂ n judge calls, only when called; 20 s overall, 5 s per call

Example chat_recall result:

[optchat recall] why did the staging deploy fail?
64+32|user: deploy to staging; echo: deploy failed … (p=0.91)
80+16|… (p=0.84)
97+1|echo: Error: DATABASE_URL is not set … (p=0.77)
message 97:
Error: DATABASE_URL is not set in environment "staging" …
[end of 1840 bytes]

Upgrading: what changes for you

  • New tools in every OptChat session. chat_search and zoom depth come with memory, like zoom; an enabled session refuses inference if chat_search is not active, as it already did for zoom, date and work.
  • The recall gate is a fifth System One gate, on by default. Opt out with --no-optchat-recall: no chat_recall tool is registered and no judge call is made for it. With all five opt-outs, OptChat is memory-only: 0.5.0's behavior plus chat_search and zoom depth.
  • Why chat_. OMP canonicalizes a tool named search to grep, so it never appears active, and recall is an OMP builtin. The prefix avoids both.
  • Unchanged costs elsewhere. The tool gate never screens chat_search or chat_recall. chat_recall spends judge calls only when the model calls it. The memory guide in the system prompt grows to document both tools, a one-time change to the cached prefix.
  • Failures are explicit. A missing judge makes chat_recall return a tool error; a judge failure or timeout returns [optchat recall] recall failed (…); no answer was found. Use zoom or chat_search. and is shown as the last System One failure in /optchat status. Recall never guesses.

How the tools compare (ticket 10, synthetic)

bun run evidence:retrieval is a new offline, deterministic harness. It builds a real memory over a synthetic 256-message chat with 12 planted facts, using a rule-based summariser that always drops values and drops topics as summaries merge, and a fake judge that scores word overlap. No provider calls, $0.

Strategy Found (seed 1 / seed 2) Agent steps Judge calls Zoom calls Bytes returned
zoom, one level per call 3/12 / 5/12 230 / 193 0 230 / 193 76,575 / 63,251
zoom with depth ≤ 4 3/12 / 5/12 223 / 181 0 223 / 181 101,629 / 92,068
chat_search 12/12 / 12/12 24 / 24 0 12 / 12 8,704 / 8,393
prefetch top-8 3/12 / 5/12 227 / 188 12 235 / 195 79,234 / 64,713
chat_recall 3/12 / 5/12 12 / 12 42 / 37 8 / 8 9,807 / 8,818
beam descent (script) 3/12 / 5/12 12 / 12 42 / 34 39 / 30 3,540 / 2,883

What it shows: every strategy that navigates summaries found only the facts whose topic still appeared in the view. chat_search was the only way to reach the others. When the topic survives, chat_recall gets there in one agent step instead of about 200 zoom calls.

What it does not show: real summary quality, Jev's judgement (the judge here is lexical overlap), the words a real agent would search for, or cost and latency. Treat it as a mechanics check, not a quality or savings claim. Details: .scratch/optchat-jev/issues/10-codemode-retrieval.md.

Verified

  • 1425 tests pass, including tests/search.test.ts (AND terms, case, kind filter, paging, exclusions, child bounds, input limits), tests/recall.test.ts (scoring threshold, descent, ties, missing children, judge failures, timeouts, aborts, call counts, UTF-8 page cuts) and three chat_recall cases through OptChat in tests/system1-e2e.test.ts (planted message reached with its original text, opt-out leaves no tool, a judge failure surfaces in status).
  • The real-host smoke passes and asserts chat_search is registered.
  • The plugin installed from this tag matches the repository byte for byte. Live on OMP 18.9.1 (main anthropic/claude-haiku-5-5, the real judge, print mode, a fresh store, five prompts): chat_search("staging port") returned the planted note (message 0) and the searching prompt itself, which is stored before the tool runs; chat_recall("What is the staging database port?") picked message 0 at p=0.97 and returned its text; and rm -rf build was still blocked by the tool gate ("danger 0.97 is at or above 0.30; no UI to confirm"). The session journaled optchat-rules ×4, optchat-recall, optchat-tool-gate and optchat-value judgments.

Not verified yet

Jev's accuracy on real descents, chat_recall on a long live chat with deep merged lines, and whether agents choose chat_search and chat_recall on their own in real work. These need paired runs with a stated budget.

Also in this release

The README has a new "At a glance" overview with an example view, and the System One section now covers choosing the judge, turning gates off, and what each gate shows. The v0.6.0 release notes were rewritten in the same style.

Install: omp plugin install 'git+https://github.com/ericjuta/omp-optchat.git#v0.7.0'.