Skip to content

fix(opencode): remove automatic full session diffs#30127

Merged
thdxr merged 1 commit into
devfrom
fix/session-remove-full-diffs
May 31, 2026
Merged

fix(opencode): remove automatic full session diffs#30127
thdxr merged 1 commit into
devfrom
fix/session-remove-full-diffs

Conversation

@thdxr

@thdxr thdxr commented May 31, 2026

Copy link
Copy Markdown
Member

Summary

  • remove automatic full-session snapshot diff generation and return empty session-level diff data while preserving the existing API/event shape
  • keep message-scoped turn diffs available through session.diff({ messageID }) and leave explicit revert diff behavior intact
  • ignore stale historical unfinished assistant rows when deriving the TUI queued marker

Root Cause

A snapshot-heavy historical session recomputed a full session diff on each turn, despite the user not needing a full-session diff surface. In the reproduced session this traversed hundreds of historical snapshot-bearing parts and produced a multi-megabyte diff. The same session also contained an old unfinished assistant row that caused all later messages to show as queued.

Verification

  • bun typecheck from packages/opencode
  • bun test test/session/snapshot-tool-race.test.ts test/session/processor-effect.test.ts test/session/revert-compact.test.ts test/server/session-diff-missing-patch.test.ts test/share/share-next.test.ts test/session/llm.test.ts test/provider/header-timeout.test.ts --timeout 30000 from packages/opencode
  • bun test test/session/prompt.test.ts test/session/compaction.test.ts --timeout 30000 from packages/opencode

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@thdxr thdxr enabled auto-merge (squash) May 31, 2026 17:26
@thdxr thdxr merged commit 2f2fcc1 into dev May 31, 2026
12 checks passed
@thdxr thdxr deleted the fix/session-remove-full-diffs branch May 31, 2026 17:34
ShamirSecret pushed a commit to ShamirSecret/auto-code-machine that referenced this pull request Jun 2, 2026
ShamirSecret pushed a commit to ShamirSecret/auto-code-machine that referenced this pull request Jun 2, 2026
0xLLLLH pushed a commit to 0xLLLLH/opencode that referenced this pull request Jun 2, 2026
ShamirSecret pushed a commit to ShamirSecret/auto-code-machine that referenced this pull request Jun 3, 2026
avion23 pushed a commit to avion23/opencode that referenced this pull request Jun 10, 2026
isaacfinnegan pushed a commit to isaacfinnegan/whispercode that referenced this pull request Jun 15, 2026
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