Skip to content

v0.49.25

Choose a tag to compare

@github-actions github-actions released this 27 Oct 12:28
· 95 commits to master since this release

v0.49.25

This patch stops tool definitions from inflating Magic Context's token count and removes a whole-history copy from every turn of a Claude session with thinking on.

Upgrading

  • Restart OpenCode, Pi or Oh My Pi after updating. No database migration is needed.

Fixed

  • Tool definitions counted once for every tool ever seen: on OpenCode, Magic Context added up every tool it had seen for a model and agent, across all sessions and projects, and never dropped one. After a restart this could make a session look full when it wasn't: a session at 76% could read as 98%, which triggered emergency cleanup and a cache rebuild. It also inflated the "Tool Defs" figure in the sidebar.

    • OpenCode 2: the count now uses exactly the tools the current request carries.
    • OpenCode 1: it counts the tools the model was offered recently. A tool stops counting once the model has been in use for about 10 minutes without it, and time spent idle doesn't count.

    Thanks to @jjjermiah.

  • Doctor on OpenCode 2: the local embedding check now looks at the plugin copy OpenCode 2 actually loads.

  • Thinking sessions: every turn of a Claude session with thinking on copied the whole message history in case a rare retry needed it. The copy is now taken only on turns where that retry can run. On large sessions this saves tens of milliseconds per turn. Thanks to @iceteaSA.