Skip to content

Data is stored in the wrong session when multiple sessions are running #20552

Closed as not planned

Description

@alihamze

Description

I had a session running in Build mode and went and opened a new session in Plan mode. As they were running, data from the Build session started showing up in the Plan session.

You can see that my Plan session (consisting of only 1 prompt) shows that it edited files:
Image

The review tab for both sessions displays identical changes, in both "Last Turn" and "Session" changes modes.

However, this isn't isolated to a UI problem. I used the event stream to confirm that the PATCH parts were in fact getting sent to messages in the Plan session. I then double checked the opencode.db sqlite file directly and confirmed that the Plan session did in fact have stored patch parts.

Plan Session ID: ses_2b54c85c5ffejvxUwZT2t1ffuc

Patch parts:
Image

Messages with the Patch parts + the message from parentID showing mode is set to plan

Image

I don't see any "read" nor "write" tool parts in the Plan session corresponding to the files it says it patched so it might be isolated to the PATCH parts.

I don't know if those parts are contributing to the Message's token counts and inflating the stats since the Messages do also have real parts in them alongside the incorrect PATCH parts.

Plugins

No response

OpenCode version

v1.3.13

Steps to reproduce

Not sure if this is relevant, but I'm running opencode web in the terminal and then having OpenCode Desktop connect to that port. Then just run 2 sessions in 1 project in the same workspace.

Screenshot and/or share link

No response

Operating System

macOS 26.3.1

Terminal

iTerm 2

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    webRelates to opencode on web / desktop
    on Apr 1, 2026
  2. removed
    bugSomething isn't working
    webRelates to opencode on web / desktop
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  3. github-actions commented on Jul 3, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions