-
Notifications
You must be signed in to change notification settings - Fork 11.4k
Open
Labels
bugSomething isn't workingSomething isn't workingcoreAnything pertaining to core functionality of the application (opencode server stuff)Anything pertaining to core functionality of the application (opencode server stuff)
Description
Description
Session import is done with this line
Database.use((db) => db.insert(SessionTable).values(Session.toRow(exportData.info)).onConflictDoNothing().run())
This means 2 things, one of which I think is a bug, and the 2nd is more of "I think this should work differently"
The bug
- You have 2 projects on the exact same path, but different machines, both running opencode
- You export a session in machine A
- You import it in machine B
- The path matches but project ID doesn't. Import crashes.
I think this is a pretty common pattern for sandboxed envs so worth addressing
The "not quite a bug but..."
Same sandboxed envs scenario
- You have session A in machine 1
- You import it in machine 2. Now you have session A there as well (Same session ID)
- You work on it in machine 2
- Now you export it in machine 2 and import it in machine 1.
Expected - will update the session in machine 1 to state of machine 2
Actual - Noop because onConflictDoNothing
Plugins
No response
OpenCode version
v1.2.10
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
Macos 15.7.3
Terminal
Ghostty
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcoreAnything pertaining to core functionality of the application (opencode server stuff)Anything pertaining to core functionality of the application (opencode server stuff)