-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Open
Labels
coreAnything pertaining to core functionality of the application (opencode server stuff)Anything pertaining to core functionality of the application (opencode server stuff)discussionUsed for feature requests, proposals, ideas, etc. Open discussionUsed for feature requests, proposals, ideas, etc. Open discussion
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
the --continue flag is useful, but not if you're running multiple opencodes concurrently. this feature would be a minimal, addition to output the session id after an opencode run to enable:
- faster continuation after a run, if running concurrent sessions where the
--continuewould not work - enable better scripting
POSIX scripting patterns:
# Chain sessions (JSON mode — cleanest):
SID=$(opencode run "first task" --format json | jq -r 'select(.type=="session.complete") | .sessionID')
opencode run --session "$SID" "continue"
# Chain sessions (default mode — stderr parsing):
SID=$(opencode run "first task" 2>&1 >/dev/null | grep '^session:' | awk '{print $2}')
opencode run --session "$SID" "continue"
# Simple — just see it in terminal output:
opencode run "do something"
# ... output ...
# session: ses_abc123
Since UI.println writes to stderr, the session ID never pollutes stdout — piping opencode run "msg" | other_tool works cleanly, and the session ID still appears in the terminal.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
coreAnything pertaining to core functionality of the application (opencode server stuff)Anything pertaining to core functionality of the application (opencode server stuff)discussionUsed for feature requests, proposals, ideas, etc. Open discussionUsed for feature requests, proposals, ideas, etc. Open discussion