Skip to content

v1.5.0

Choose a tag to compare

@sblattj sblattj released this 01 Nov 21:48
· 9 commits to main since this release

Use v1.5.1 instead. This build carried zod 4.4.3, undoing the 1.4.1 security update.

Goal sessions now compact themselves. OpenCode never auto-compacts a model that reports limit.context: 0, so a long goal on such a model kept growing (638,078 tokens in the case that prompted this).

Added: forced compaction, on by default at 200,000 tokens

  • --compact-at <n> and compactAtTokens set the threshold; 0 turns it off. It applies on every model, so a 1M-window model also compacts at 200k unless you raise it.
  • Checked after every finished step, so one long turn is caught mid-turn. The idle check is the backstop.
  • Never two compactions for one crossing. On a model with a real limit.context, the host's own check gets one step first.
  • A failed compaction does not block the goal: the plugin deletes the failed compaction message, because the host would otherwise re-run it on later prompts.
  • Bounded: 3 failed requests stop forcing until the next compaction, and forcing is held when two compactions in a row leave the context over the threshold.
  • Goal sessions only. Forcing never pauses or stops a goal.

Added: npm run smoke:forced-compaction, which runs the feature against a real OpenCode host with a mock model.

Checked against OpenCode 1.19.0 (running) and the v1.19.5 source. Full details in CHANGELOG.md and docs/reference.md.