anomalyco / anomalyco/opencode
[FEATURE]:Auto-resume interrupted sessions on startup
@Hona is already working on this.
Since Aug 25, 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: Auto-resume interrupted sessions on startup
Problem
When OpenCode Desktop is restarted (crash, reboot, close), sessions with interrupted assistant responses lose their partial reasoning. The assistant was mid-thinking but the response was never saved to the database.
Currently there's no way to:
- Detect which sessions were interrupted
- Auto-prompt the model to continue in those sessions
- Distinguish "open tabs" from "closed sessions" in the database
Proposed Solution
Option A: --continue-all flag
opencode --continue-all
On startup, automatically send a "continue" prompt to all sessions where:
time_archived IS NULL(active session)- Last
message.role == 'assistant'(assistant was responding)
Option B: Save partial responses on interrupt
When the app is closing or crashing, save the current in-progress response (including reasoning) to the database. This would allow true "resume from where you left off" behavior.
Option C: Tab-aware session detection
Expose which sessions are currently open as tabs in the Desktop UI, so scripts can target only those sessions.
Current Workaround
I use a PowerShell script that:
- Queries
sessiontable for active sessions - Checks if last message is from assistant
- Sends
opencode run -s <id> "Продолжи"to each
But this doesn't know which tabs are actually open in the UI.
Environment
- OpenCode Desktop v1.18.22 (Windows)
- 5 tabs: Windows, Other, Games, Network, MiMo 2.5
Why This Matters
Users work on multiple tasks simultaneously in different tabs. When the app restarts, they want all interrupted work to resume automatically without manually clicking into each tab.
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.