📈 GH Trending Explorer 🎲 Surprise me

← all repos

ericjuta / omp-optchat

git clone https://github.com/ericjuta/omp-optchat.git v0.12.0 · 2d ago

Endless OMP chat with durable history and binary summary-tree memory, inspired by OptChat

+0
stars, 24h · #34,658
+~0
stars, 7 days · #35,133
+77
stars, 30 days · #6,462
78
★ total
4
forks · 2 open issues

Star history (as recorded here)

2026-10-20 · 77 ★ 2026-10-22 · 78 ★
LanguageTypeScript
License—
Created2026-10-05 (16d ago)
Last pushtoday
Watchers0
OwnerUser

Links

README excerpt
# OMP OptChat
An OMP extension implementing Victor Taelin's OptChat specification: one durable chat, a binary tree of contextual summaries, and a fresh model context for each user turn. Original text remains retrievable with `zoom`; summaries are navigation, not a replacement for the log.
## At a glance
- **One chat that never ends.** Every user message, reply, tool call, tool result and subagent report is appended to a local, fsynced log under OMP's agent directory, one store per git worktree. Nothing is ever deleted or rewritten.
- **A view instead of a transcript.** Each turn the model sees a fixed-size view of the whole history: one-line summaries, oldest first, where older lines cover more messages. The view replaces the old inference history between turns, so a long chat stops growing the context.
- **Nothing is lost.** The model navigates the view with memory tools: `zoom` opens a line into its halves (or several levels at once) down to the original message, `chat_search` finds exact words in the original messages, `date` and `work` fetch timestamps and captured subagent reports.
- **System One gates, on by default.** Four small judgments through OMP's `judge` role keep standing rules across turns, prefetch relevant history before a turn, hint the compressor about what matters, and power `chat_recall`, which seeds candidates from exact-word matches in the original messages and scans the messages under its top lines for the one that answers a question. Each has its own opt-out flag.
- **Plain OMP is one flag away.** `omp --no-optchat` runs an ordinary session with no memory tools, logging, compression or context changes.
What the model sees at the start of a turn (illustrative, shortened):
 [code] 
Each `id+n|text` line summarizes the `n` messages starting at `id`. To check the exact error from message 97, the model calls `zoom(96, 2)`, then `zoom(97, 1)` for the original text; if no line mentions it any more, `chat_search("DATABASE_URL")` finds it by its words, and `chat_recall("why did the staging deploy fail?")` has the judge score the top lines and the messages under them instead.
What it costs: a compressor call per stored message and per merge, plus judge calls with the default gates: one rules request per user message, and on a turn whose view merged, one prefetch request per chunk of up to 64 view lines. When the history still fits the model's context, OptChat costs more than plain OMP for the same answers; its value is recall past the context window (see "0.5.0 measurements"). Every compressor call is also recorded, counts only and never content, in `metrics.jsonl` in the store directory, and `/optchat status` sums it (see **Cost.** below).
## Requirements and start
- OMP **18.10.3 or newer**, Bun, and Linux. CI checks every push and runs a weekly check against the latest published OMP SDK.
- An authenticated model for the main chat and an authenticated compressor model. Compression uses OMP's `@smol` role by default; choose a comp