anomalyco / anomalyco/opencode
[FEATURE]:`--continue-all` flag to auto-resume all incomplete sessions
@jlongster is already working on this.
Since Aug 24, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
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
Feature Request: --continue-all flag to auto-resume all incomplete sessions
Summary
Add a --continue-all flag (or --auto-resume) that automatically detects and resumes all sessions where the assistant's reasoning was interrupted (last message is from assistant role).
Use Case
When OpenCode is restarted (after a crash, system reboot, or just a new day), users often have multiple sessions with unfinished assistant responses. Currently:
opencode -conly continues the last sessionopencode -s <id>requires knowing the session ID manually- There's no built-in way to see which sessions are "incomplete"
Proposed Behavior
opencode --continue-all
On startup, this flag would:
- Query all sessions where
time_archived IS NULL - For each session, check if the last
message.role == 'assistant'(meaning the assistant was mid-response) - Present a selection menu or automatically resume all of them in separate tabs/windows
Alternative: --auto-resume (quiet mode)
opencode --auto-resume
Same as above, but skips the menu and auto-opens all incomplete sessions without user interaction.
Current Workaround
I've written a PowerShell script that queries the SQLite DB directly:
$sessions = opencode session list --format json | ConvertFrom-Json
foreach ($s in $sessions) {
$lastMsg = sqlite3 $dbPath "SELECT data FROM message WHERE session_id='$($s.id)' ORDER BY time_created DESC LIMIT 1"
$data = $lastMsg | ConvertFrom-Json
if ($data.role -eq "assistant") {
Start-Process opencode -ArgumentList "-s $($s.id)"
}
}
But this requires:
- External
sqlite3binary - Manual DB path discovery
- Launching multiple processes
Additional Context
This would be especially useful for:
- Desktop app users who work on multiple tasks simultaneously
- Users who frequently restart their system
- Teams sharing sessions who need to pick up where others left off
Environment
- OpenCode Desktop v1.18.22 (Windows)
- Also affects CLI usage
Thank you for considering this feature!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.