some session data are not cleaned up on unshare, leading to inconsistencies on reshare #8085

Open
opened 2026-02-16 18:09:08 -05:00 by yindo · 2 comments
Owner

Originally created by @sazary on GitHub (Jan 30, 2026).

Originally assigned to: @thdxr on GitHub.

Description

When a session is unshared and then reshared, stale data from the previous share appears mixed with the new data.
The share_event and share_compaction storage entries are not cleaned up during unshare, causing old sync events to be replayed when the session is reshared.

Besides the inconsistency on reshare, I think it's important to clear storage properly when the user asks to delete his data.

The session included in the video is this

Plugins

No response

OpenCode version

v1.1.45

Steps to reproduce

  1. Create a session and send a message ("hi 1" in the shared video)
  2. Share the session with /share
  3. Open the share URL in a browser (this triggers compaction cache)
  4. Unshare with /unshare
  5. /undo and edit the previous message ("hi 2" in the shared video)
  6. Share again with /share
  7. Open/refresh the share URL in browser
  8. Observe that both the old message AND the new message appear, when only the new message should be visible

Screenshot and/or share link

https://github.com/user-attachments/assets/74abbe28-b02c-4c15-9a42-076ed4da6ccd

Operating System

macos

Terminal

ghostty

Originally created by @sazary on GitHub (Jan 30, 2026). Originally assigned to: @thdxr on GitHub. ### Description When a session is unshared and then reshared, stale data from the previous share appears mixed with the new data. The `share_event` and `share_compaction` storage entries are not cleaned up during unshare, causing old sync events to be replayed when the session is reshared. Besides the inconsistency on reshare, I think it's important to clear storage properly when the user asks to delete his data. The session included in the video is [this](https://opncd.ai/share/QSdriVEa) ### Plugins _No response_ ### OpenCode version v1.1.45 ### Steps to reproduce 1. Create a session and send a message ("hi 1" in the shared video) 2. Share the session with `/share` 3. Open the share URL in a browser (this triggers compaction cache) 4. Unshare with `/unshare` 5. `/undo` and edit the previous message ("hi 2" in the shared video) 6. Share again with `/share` 7. Open/refresh the share URL in browser 8. Observe that both the old message AND the new message appear, when only the new message should be visible ### Screenshot and/or share link https://github.com/user-attachments/assets/74abbe28-b02c-4c15-9a42-076ed4da6ccd ### Operating System macos ### Terminal ghostty
yindo added the bug label 2026-02-16 18:09:08 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 30, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #9988: Shared Link Missing Latest Chat Content (Even After Re-sharing) — Similar issue where resharing doesn't update content
  • #9241: Content of share session URL is blank — Related to share data not being displayed correctly
  • #10199: Share session bug — Issue with incomplete session sharing
  • #4980: Does OpenCode automatically clean up old session/conversation data? — Related question about data cleanup behavior

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 30, 2026): This issue might be a duplicate of existing issues. Please check: - #9988: Shared Link Missing Latest Chat Content (Even After Re-sharing) — Similar issue where resharing doesn't update content - #9241: Content of share session URL is blank — Related to share data not being displayed correctly - #10199: Share session bug — Issue with incomplete session sharing - #4980: Does OpenCode automatically clean up old session/conversation data? — Related question about data cleanup behavior Feel free to ignore if none of these address your specific case.
Author
Owner

@sazary commented on GitHub (Jan 30, 2026):

none of those are relevant

@sazary commented on GitHub (Jan 30, 2026): none of those are relevant
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8085