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
/compact can keep completed work in Next Move after preserved-tail turns #38530
A repeated /compact can preserve stale work under Next Move when the previous summary lists an action and the recent preserved tail shows that action was completed. The tail remains in the session but is excluded from the summarizer history, so it cannot reconcile the previous summary.
Expected: completed work is removed from Next Move. The recent tail should remain preserved and should only be supplied as a small, sanitized reconciliation audit.
Replaces #28063, which was closed by inactivity. PR #46364 contains the current regression coverage and bounded tail-audit implementation, replacing the auto-closed #28067.
Plugins
None
OpenCode version
Current dev (9f69463f1d)
Steps to reproduce
Compact a session whose summary lists run tests under Next Move.
Run the tests successfully in one of the preserved recent turns.
Run /compact again.
Observe that run tests can remain under Next Move.
Finished a multi-step change in a session: implemented an algorithm, updated tests, ran the full suite green, updated docs, and committed.
Ran /compact.
The generated summary listed the just-completed work under "Next Move" (e.g. "update tests", "update docs", "build and run tests") as if still pending, instead of in the Completed/Done section.
Expected: completed items move out of Next Move. Actual: the new session's agent re-did the listed work from scratch — edits succeeded against the original strings, confirming the work really was finished before compaction.
Same root cause as #28063/#38530: the preserved recent tail (which contains the completed work) is excluded from the summarizer input, so the previous summary's Next Move items survive unchanged. +1 for the bounded tail-audit fix in #28067.
Thanks for the detailed report and for the work on #28067 and #46364.
The commit you tested (9f69463f1d) is from before v2 replaced the dev branch. The code involved (compaction.tail_turns and tail_start_id in packages/opencode/src/session/compaction.ts) belongs to OpenCode v1 (1.x). v1 only gets fixes for critical bugs such as data loss, crashes or security problems. A stale Next Move item is not in that category, so this is unlikely to be fixed in v1.
Compaction works differently in v2 (@opencode/cli, code now in packages/core/src/session/compaction.ts). The summarizer normally gets the whole conversation, including the recent turns that are kept beside the summary. It is also told to move completed work out of Work State and Next Move. The kept turns are left out only in a fallback, when the full request doesn't fit the context window. Please try v2. If you still see completed work under Next Move there, or you think this is critical, reply here with the version and steps.
We haven't heard back, so I'm closing this as not planned. This report is about OpenCode v1's compaction (compaction.tail_turns / tail_start_id in packages/opencode). v1 only gets fixes for critical bugs, and a stale Next Move item isn't one of them.
In v2 (@opencode/cli), the summarizer normally gets the recent turns that are kept beside the summary. If you still see completed work under Next Move on v2, please open a new issue with your opencode --version and the steps to reproduce. #50816 tracks a similar report on v2. Thanks again for the detailed write-up and the PRs.
Activity
kkga commentedon Aug 15, 2026
Confirmed here too. Repro from a real session:
Expected: completed items move out of Next Move. Actual: the new session's agent re-did the listed work from scratch — edits succeeded against the original strings, confirming the work really was finished before compaction.
Same root cause as #28063/#38530: the preserved recent tail (which contains the completed work) is excluded from the summarizer input, so the previous summary's Next Move items survive unchanged. +1 for the bounded tail-audit fix in #28067.
opencodejr commentedon Oct 28, 2026
Thanks for the detailed report and for the work on #28067 and #46364.
The commit you tested (
9f69463f1d) is from before v2 replaced thedevbranch. The code involved (compaction.tail_turnsandtail_start_idinpackages/opencode/src/session/compaction.ts) belongs to OpenCode v1 (1.x). v1 only gets fixes for critical bugs such as data loss, crashes or security problems. A staleNext Moveitem is not in that category, so this is unlikely to be fixed in v1.Compaction works differently in v2 (
@opencode/cli, code now inpackages/core/src/session/compaction.ts). The summarizer normally gets the whole conversation, including the recent turns that are kept beside the summary. It is also told to move completed work out of Work State and Next Move. The kept turns are left out only in a fallback, when the full request doesn't fit the context window. Please try v2. If you still see completed work underNext Movethere, or you think this is critical, reply here with the version and steps.Related:
opencodejr commentedon Oct 29, 2026
We haven't heard back, so I'm closing this as not planned. This report is about OpenCode v1's compaction (
compaction.tail_turns/tail_start_idinpackages/opencode). v1 only gets fixes for critical bugs, and a staleNext Moveitem isn't one of them.In v2 (
@opencode/cli), the summarizer normally gets the recent turns that are kept beside the summary. If you still see completed work underNext Moveon v2, please open a new issue with youropencode --versionand the steps to reproduce. #50816 tracks a similar report on v2. Thanks again for the detailed write-up and the PRs.