OpenCode bug: long-run session compaction always overshoots context by exactly 1 token

ppereirasky · ghdev · 2026-10-12

anomalyco/opencode #54797: Session compaction failed (labeled reproduced)

A user running 4-hour long-horizon tasks with OpenCode Desktop (2.0.27, present since v1) hit the failure 3 times in one run: the model's 139,264-token context limit is exceeded by 63,472 output + 75,793 input = 139,265 tokens — off by exactly 1 token.

Original post →

More from coding & agent

coding & agent channel →