Skip to content

fix(core): preserve compaction after revert - #41604

Open
opencode-agent[bot] wants to merge 1 commit into
v2from
revert-compact-repro
Open

fix(core): preserve compaction after revert#41604
opencode-agent[bot] wants to merge 1 commit into
v2from
revert-compact-repro

Conversation

@opencode-agent

Copy link
Copy Markdown
Contributor

Summary

  • commit a staged session revert before admitting manual compaction
  • prevent the next prompt from truncating a completed compaction at the old revert boundary
  • cover the ordering with a core regression test

Reproduction

  1. Revert the latest message.
  2. Compact the session while the revert is staged.
  3. Send a follow-up prompt.
  4. The revert commit removes the compaction message, so the follow-up does not use its summary.

Verification

  • bun test test/session-compact.test.ts --timeout 30000
  • bun typecheck
  • OpenCode Drive /undo/compact → follow-up flow; verified the follow-up model request contains the compaction summary

Requested by: @rekram1-node (Aiden Cline via Slack)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant