headless mode --resume #1592

Open
opened 2026-02-16 17:31:41 -05:00 by yindo · 10 comments
Owner

Originally created by @sjcotto on GitHub (Sep 3, 2025).

Originally assigned to: @thdxr on GitHub.

opencode support the --resume when runing as headless? similar to claude code

Originally created by @sjcotto on GitHub (Sep 3, 2025). Originally assigned to: @thdxr on GitHub. opencode support the --resume when runing as headless? similar to claude code
yindo added the discussion label 2026-02-16 17:31:41 -05:00
Author
Owner

@rekram1-node commented on GitHub (Sep 3, 2025):

@sjcotto have you tried the -c flag?

@rekram1-node commented on GitHub (Sep 3, 2025): @sjcotto have you tried the -c flag?
Author
Owner

@rekram1-node commented on GitHub (Sep 3, 2025):

ex:

opencode run "hello"

opencode run "goodbye" -c

^ second one will send prompt to last updated session

@rekram1-node commented on GitHub (Sep 3, 2025): ex: `opencode run "hello"` `opencode run "goodbye" -c` ^ second one will send prompt to last updated session
Author
Owner

@rekram1-node commented on GitHub (Sep 3, 2025):

Oh wait looking at the --resume it has a picker doesn't it

@rekram1-node commented on GitHub (Sep 3, 2025): Oh wait looking at the --resume it has a picker doesn't it
Author
Owner

@sjcotto commented on GitHub (Sep 3, 2025):

yes, so how is the command? for example

run in headless mode, obtain output and session id, then run another one passing same sessionId , not sure if those commands are documented somewhere

@sjcotto commented on GitHub (Sep 3, 2025): yes, so how is the command? for example run in headless mode, obtain output and session id, then run another one passing same sessionId , not sure if those commands are documented somewhere
Author
Owner

@rekram1-node commented on GitHub (Sep 3, 2025):

yeah I don't think we have a session id listing command atm that should probably exist

this makes sense

@rekram1-node commented on GitHub (Sep 3, 2025): yeah I don't think we have a session id listing command atm that should probably exist this makes sense
Author
Owner

@sjcotto commented on GitHub (Sep 5, 2025):

This can be added ? It's very important when running in a CI for second
time to be able to resume a session

On Wed, Sep 3, 2025, 7:52 PM Aiden Cline @.***> wrote:

rekram1-node left a comment (sst/opencode#2404)
https://github.com/sst/opencode/issues/2404#issuecomment-3251053516

yeah I don't think we have a session id listing command atm that should
probably exist


Reply to this email directly, view it on GitHub
https://github.com/sst/opencode/issues/2404#issuecomment-3251053516, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AA5TMFT25BVHFNNPLAZJN2L3Q5WLPAVCNFSM6AAAAACFRUYTD2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTENJRGA2TGNJRGY
.
You are receiving this because you were mentioned.Message ID:
@.***>

@sjcotto commented on GitHub (Sep 5, 2025): This can be added ? It's very important when running in a CI for second time to be able to resume a session On Wed, Sep 3, 2025, 7:52 PM Aiden Cline ***@***.***> wrote: > *rekram1-node* left a comment (sst/opencode#2404) > <https://github.com/sst/opencode/issues/2404#issuecomment-3251053516> > > yeah I don't think we have a session id listing command atm that should > probably exist > > — > Reply to this email directly, view it on GitHub > <https://github.com/sst/opencode/issues/2404#issuecomment-3251053516>, or > unsubscribe > <https://github.com/notifications/unsubscribe-auth/AA5TMFT25BVHFNNPLAZJN2L3Q5WLPAVCNFSM6AAAAACFRUYTD2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTENJRGA2TGNJRGY> > . > You are receiving this because you were mentioned.Message ID: > ***@***.***> >
Author
Owner

@rekram1-node commented on GitHub (Sep 5, 2025):

Yeah 100%

I was thinking something like opencode session list

@rekram1-node commented on GitHub (Sep 5, 2025): Yeah 100% I was thinking something like `opencode session list`
Author
Owner

@JimmyBenHur commented on GitHub (Nov 16, 2025):

+1

@JimmyBenHur commented on GitHub (Nov 16, 2025): +1
Author
Owner

@yanmxa commented on GitHub (Jan 10, 2026):

+1 Looking forward to this feature with fuzzy matching support.

@yanmxa commented on GitHub (Jan 10, 2026): +1 Looking forward to this feature with fuzzy matching support.
Author
Owner

@raihanadf commented on GitHub (Jan 27, 2026):

+1

@raihanadf commented on GitHub (Jan 27, 2026): +1
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1592