Repository navigation
v0.49.90
·
91 commits
to master
since this release
v0.49.90
This patch fixes three ways an outdated checkpoint record could hide messages or refuse a session on OpenCode 2. OpenCode 1 and Pi are not affected and do not change.
Upgrading
Update the plugin with npx @cortexkit/magic-context@latest doctor, then restart your host. No database migration is needed.
Fixed
- OpenCode 2: messages could be missing from requests after the history got shorter. An OpenCode 2 session keeps a record of where the stored conversation continues after the history block. When the summaries later covered less than that record claimed, the messages in between were sent neither as messages nor as summaries. The store was intact, and nothing told you. We reproduced it three ways: a
/ctx-recompthat stopped partway after a manual/compact(28 messages), a/ctx-recompthat stopped partway in a session converted from OpenCode 1 (37 messages), and a completed/ctx-recompfollowed by a revert in such a session (17 messages). Magic Context now ignores a record that points past the history it rendered, serves the stored messages from the real position, and saves the corrected record on that request. Present since 0.49.47. 0.49.89 already stopped a partial/ctx-recompfrom shortening the history; this release repairs sessions that are already in that state and covers the other ways into it. - OpenCode 2: a session could refuse every turn with
MC-S06after a revert past its summaries. The sequence was an early/compact, later summaries, a second/compact, and a revert that removed the messages those summaries ended on. Now a revert retires the summaries of the messages it removed, and a session with no summaries and no usable record starts again from its first stored message. A session that was already refused before the update still holds its outdated summaries: run/ctx-recompto the end once, and it serves turns again.
What to expect after the update
- One prompt rebuild per affected session. The first request after the correction rebuilds the cached prompt once. In a session that was refused on every turn and still has summaries, the second request changes once more, because one host instruction line is now covered by a summary. Magic Context logs that change once.
- Restored messages can appear as
[dropped §N§]. Messages that were marked as no longer needed before the history got shorter stay reduced. They come back as placeholders, or stay left out where an earlier cleanup had removed the message from the request, until a summary covers them again.ctx_expandwith the tag or the message still returns the original. Search and rangectx_expandtreat these messages as visible; that is a known limit and not new in this release. - A large session may refuse one or two turns while it catches up. In our test, a session with 75,000 tokens of unsummarized messages in a 60,000-token window was refused for two turns while summaries were written, and served at 55,700 tokens on the third. No command or restart was needed.
- One limit. The proof that a revert removed a message is kept in memory, from the revert on. So two kinds of session can keep the
MC-S06refusal: one that was refused before the update, and one whose host restarted right after the revert while a summary run was still in progress. Run/ctx-recompto the end to clear it. - Healthy sessions do not change. On OpenCode 2.0.22, 2.1.0, 2.3.2 and 2.4.2, requests of sessions without this damage are byte-identical with and without this fix.