Repository navigation
OpenCode Prime v0.39.2
v0.39.2 — 2026-09-21
🐛 Fix: RTK compression no longer traps the model in a loop
The vendored rtk-write plugin rewrote every shell command through RTK unconditionally, and RTK's compression is lossy but invisible to the model. When the model needed elided data it re-ran the same command, the rewrite cache served the identical compressed output, and the session looped.
Three softness mechanisms now keep compression on without trapping the agent:
- Loop guard — once a command's output was elided (RTK's
[see remaining: ...]marker), that command runs unmodified for the rest of the session; a repeat threshold (default3) backstops lossy-but-unmarked output and covers elision-marker drift. State is two-tiered (evictable partial counts plus a large non-rewrite set) so memory bounds cannot resurrect a loop. - Escape hatch — prefix any command with
RTK_RAW=1to bypass rewriting entirely, e.g.RTK_RAW=1 git status. - Recovery hint — when RTK elides output,
tool.execute.afterappends a one-line hint naming the exact rerun command. The original command is captured bycallIDin the before-hook, so the hint never names the already-rewritten form.
Tuning lives in tools.rtkWrite (enabled, loopThreshold, blocklist) in ~/.config/opencode/options.jsonc; defaults are enabled, loopThreshold: 3, empty blocklist.
🔖 Why a patch bump
Bug fix plus behavior hardening — no new command or skill, so the default patch bump applies (DEVELOPING.md §Adding a new skill or command, step 6).