Repository navigation
v0.49.68
·
12 commits
to master
since this release
v0.49.68
This patch fixes two OpenCode 2 problems: a request-size estimate that could keep refusing turns, and restored history that miscounted messages other plugins inject.
Upgrading
Update the plugin and restart OpenCode. No database migration is needed.
Fixed
- OpenCode 2 could refuse turns repeatedly when a request carried a reasoning setting or an inline image (#955): OpenCode 2 adds an "effort" part when you pick a model variant, and it sends pasted images as "media" parts. Magic Context's request-size estimate didn't know either kind, so it marked the whole estimate as unreliable. When the history boundary also couldn't be placed, Magic Context then refused the turn without starting the recovery that would have summarized past it, and kept refusing until something unrelated rebuilt the history. An effort part now counts as zero tokens, since it selects a setting and carries no prompt text, and an inline image counts at its token cost, the same way image files already did. Requests themselves are unchanged.
- Messages injected by other plugins counted as your own turns after a history restore on OpenCode 2 (#954): OpenCode 2 stores messages that another plugin injects as their own kind of row. When Magic Context restored older history, it rebuilt those rows as ordinary user messages, so they counted as turns you had typed. That moved when old tool output was cleared, where the current turn started, and when reminders fired. Restored injected messages keep their marking now. What is sent to the provider is byte-for-byte the same.