You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(opencode): DCP compress cosmetic on ≥1.18.15 — model-visible context never shrinks #43764
DCP compress (@tarquinen/[email protected]) is cosmetic on opencode ≥1.18.15 — the compress tool executes, blocks are recorded in plugin state, success text is returned, but the model-visible context never shrinks. This causes an infinite nudge loop: DCP nudges every turn because getCurrentTokenUsage > maxContextLimit, the model calls compress, context stays the same, repeat.
Regression
db581e47a ("fix(opencode): order legacy message loop by time (#40990)"), merged into v1.18.15, changed latest() in message-v2.ts from pure monotonic MessageID comparison to isAfter() = time.created first, ID as tie-breaker. This breaks DCP's block-range alignment with what opencode treats as the latest turn — blocks get recorded but the filterCompressedRanges removal step no longer reduces what the model sees.
Verified
Same byte-identical DCP 3.1.15 plugin on two machines:
Machine
opencode
DCP compress
Model-visible context
local
1.18.13
Works
Drops 130K→80K, block hierarchy forms
minipc
1.18.18
Cosmetic
Stays ~135K despite 21 blocks covering ~100% of messages
Native compaction (compaction: {auto: true}) is inert on both (session_context_epoch rows = 0). The context drop on 1.18.13 is confirmed to be DCP's messages.transform removal, not core compaction.
Activity
thdxr commentedon Oct 11, 2026
Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (
opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊