Repository navigation
v0.49.26
v0.49.26
This patch stops Magic Context from serving an old copy of text another OpenCode plugin adds to your messages. It also stops the historian from occasionally skipping or repeating a message on OpenCode 1.
Upgrading
- Restart OpenCode after updating. No database migration is needed.
Fixed
-
Text another plugin adds on OpenCode 1: some plugins add a text part to the current message on every step, for example a marker that changes from step to step. Magic Context treated that part as part of the conversation: it numbered it, saved its text, and on later steps put the saved copy back. The plugin's current text was replaced by an older one, which the plugin could then refuse.
- New parts: text another plugin adds is now left exactly as that plugin wrote it. It's never numbered, saved or restored, and
ctx_reduceskips its id. - Existing sessions: a part an older release already numbered keeps the bytes that release sent while the plugin's text is unchanged, so the upgrade doesn't break the prompt cache.
OpenCode 2, Pi and Oh My Pi are unaffected.
- New parts: text another plugin adds is now left exactly as that plugin wrote it. It's never numbered, saved or restored, and
-
Historian skipping or repeating a message on OpenCode 1: Magic Context keeps a running count of each session's messages. OpenCode orders messages by when they were created, not when they were saved, so a message saved a few milliseconds late could be left out of that count until OpenCode restarted. The historian started each new chunk from the stored count, so it could skip one message for good, then summarize another twice after the restart. Now:
- Where the historian continues: it starts after the last message it summarized, found by that message's id.
- Detecting a late save: the count notices a message saved late and rebuilds itself. The check looks only at rows written since the last check, so it costs the same however long the session is.
- A wrong count found mid-run: the run ends without publishing a summary and tries again once the count is rebuilt.
Messages skipped before this release stay unsummarized. They are still in the session, and
ctx_expandandctx_searchcan read them.