Repository navigation
Description
Feature hasn't been suggested before.
- I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Let a session move between opencode instances and come back: work on a session served by a remote opencode serve, continue it on a local instance while that server is unreachable, and return the local continuation to the server when it is reachable again.
The use case. Each user's sessions live on their own remote opencode serve, and a desktop client talks to it. When the laptop loses the connection to that server, the user wants to keep working in the same session with a local opencode instance. When the connection is back, the work done offline should land on the server, without losing anything that happened there in the meantime (for example, a run that finished on the server).
What v2.0.20 already has, which gets most of the way:
SessionTransfer(packages/core/src/session/transfer.ts): export a session's info and settled messages; import them into another instance. The CLI'ssession exportandsession importuse it, and the import goes throughPOST /api/experimental/session/import.- Fork metadata on a session:
fork: { sessionID, boundary }(packages/core/src/session/info.ts), and asession.forkedevent.
What is missing for this use case:
- Import as a fork. Import the messages after a boundary as a new session, forked from an existing session at that boundary, so the lineage is kept. Today import keeps the session id and refuses an existing one with 409 (cli: V2 session import fails when the session ID already exists #48335); fix(core): copy imported sessions on ID collision #48336 would import a detached copy with fresh ids instead.
- Incremental export. Export only the messages after a given message id, so a client can keep a local mirror and ship only the difference.
- A stable route for export and import. Today export runs through the CLI, which boots a full project instance ([FEATURE]: run export/import without booting a project instance #42490), and import is under
/api/experimental. - Optional: a public route to create a fork at a boundary, without importing.
With 1 and 2, returning offline work never needs a merge: the offline part becomes a fork of the server's session at the last message both sides had.
Related, not duplicates:
- cli: V2 session import fails when the session ID already exists #48335, fix(core): copy imported sessions on ID collision #48336 and session: import rejects V1 export JSON; V2 export round-trip works #49314: the import path's current gaps.
- [FEATURE]: run export/import without booting a project instance #42490: export without booting a project instance.
- tui: open a remote server session as a tab #45346 and tui: saved tabs are shared between local and remote servers #47998: opening and keeping sessions from remote servers in the client.
- [FEATURE]:opencode-conversation-sync-skill #36509 and [FEATURE]:Sync chat session (all content) #38011 (closed): backing up or syncing sessions across devices. This request is narrower: one session continued on a second instance and returned to the first, built on
SessionTransferand the existing fork model.
Is cross-device session continuity on your roadmap? If it is, we are glad to follow your design rather than build our own on top.
Activity
github-actions commentedon Oct 2, 2026
This issue might be a duplicate of existing issues. Please check:
These cover related cross-device session-sync needs; this issue adds offline continuation between instances and returning the work as a fork.
opencodejr commentedon Oct 27, 2026
Thanks for the detailed write-up, @Skeptomenos!
To restate the request: let a session served by a remote
opencode servebe continued on a local instance while the server is unreachable, then sent back as a fork of the server's session at the last shared message. Building blocks:Today
SessionTransfer.importkeeps the exported session id and refuses an existing one, and export always returns the full settled transcript. So this needs new behaviour rather than a bug fix. It also can't be done as a plugin, because import and fork creation happen inside core and plugins can't add server routes.Maintainers will consider it, including your question about whether cross-device continuity is on the roadmap. I can't promise anything.
Related issues:
neriousy commentedon Nov 12, 2026
Thanks for the suggestion. This isn't something we plan to build, so closing to keep the tracker focused.