You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cli: V2 session import fails when the session ID already exists #48335
Thanks for the clear write-up! You're asking for opencode2 import to create an independent copy when the session ID already exists locally, with fresh session and message IDs, and to print the new session ID, instead of stopping with "Session already exists". That would let you duplicate a session into another project, or share copies between machines that already have it, which /move doesn't cover.
Right now, rejecting an import whose ID already exists is intentional: the import endpoint returns a conflict, the CLI prints Session already exists, and the CLI tests check for that. So I've filed this as a feature request rather than a bug. Maintainers will consider it, perhaps as an opt-in flag on import, but I can't promise when or whether it will land. This can't be done as a plugin today, because plugins have no hook into session import.
Activity
opencodejr commentedon Oct 28, 2026
Thanks for the clear write-up! You're asking for
opencode2 importto create an independent copy when the session ID already exists locally, with fresh session and message IDs, and to print the new session ID, instead of stopping with "Session already exists". That would let you duplicate a session into another project, or share copies between machines that already have it, which/movedoesn't cover.Right now, rejecting an import whose ID already exists is intentional: the import endpoint returns a conflict, the CLI prints
Session already exists, and the CLI tests check for that. So I've filed this as a feature request rather than a bug. Maintainers will consider it, perhaps as an opt-in flag onimport, but I can't promise when or whether it will land. This can't be done as a plugin today, because plugins have no hook into session import.