[FEATURE]: Ability to pass in a sessionId for the opencode session to be tied to
Feature hasn't been suggested before.
- [x] I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
I have a multi-opencode orchestrator, and when i close it and re-open i'd like to resume the same session I was on previously.
opencode -c just opens globally the last session
and i know there's opencode -s <sessionId> but it requires me to somehow screen scrape and get that session id back
I'm proposing
opencode new -s <sessionId> and that sessionId being assigned to that instance for me to opencode -s <sessionId> and come back to it
this also works with opencode new -s "feature-dashboard" and let me come back to working on that feature on a specific project
(maybe the -s should be .git scoped)
This issue might be a duplicate of existing issues. Please check:
- #5381: [FEATURE]:opencode run --session [set new session id] - Similar request to set custom session IDs for programmatic session management
- #3434: Feature request: Start and continue a session with opencode run -s - Proposes similar behavior to create sessions if they don't exist with a custom ID
- #7265: [FEATURE]: Allow independent plan/build per session - Related to multi-session orchestration
Feel free to ignore if none of these address your specific case.
duplicate