Skip to content

fix: ignore failed native compaction summaries - #682

Open
Tarquinen wants to merge 2 commits into
devfrom
fix/failed-compaction-reset
Open

Tarquinen wants to merge 2 commits into
devfrom
fix/failed-compaction-reset

Conversation

@Tarquinen

@Tarquinen Tarquinen commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

Refs #650 (the failed-summary part; the concurrent-session part is not covered)

  • findLastCompactionTimestamp now only counts an assistant summary that finished without an error, the same check OpenCode uses. A failed compaction no longer resets and saves an empty DCP state.
  • V2 history marks completed compaction entries as finished, so V2 still detects native compaction.

Tested: unit tests (V1 failed summary, V2 history compaction). Sandbox on OpenCode 1.19.5: a failed summary mid-session keeps the blocks (before: state wiped, 14.9K → 43.2K), and a real /compact still resets. Sandbox on OpenCode 2.3.0: /compact still logs "Detected compaction" and IDs restart at @1@.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant