Summary
opencode serve startup auto-resume currently only matches sessions with tool error Tool execution was interrupted by server restart.
In practice, many interrupted sessions are persisted as:
- assistant error
MessageAbortedError
- or tool error
Tool execution aborted
These sessions remain stopped after restart even when there is no newer user message.
Repro
- Start a long-running session.
- Stop/restart server while session is active.
- Start
opencode serve again.
- Observe
auto resume complete with resumed=0 and session remains stopped.
Expected
Serve startup should also resume sessions interrupted via abort path when no later user prompt exists.
Notes
Observed local DB state contains multiple recent sessions with MessageAbortedError and no following user message, while auto-resume scanned sessions but resumed none.
Summary
opencode servestartup auto-resume currently only matches sessions with tool errorTool execution was interrupted by server restart.In practice, many interrupted sessions are persisted as:
MessageAbortedErrorTool execution abortedThese sessions remain stopped after restart even when there is no newer user message.
Repro
opencode serveagain.auto resume completewithresumed=0and session remains stopped.Expected
Serve startup should also resume sessions interrupted via abort path when no later user prompt exists.
Notes
Observed local DB state contains multiple recent sessions with
MessageAbortedErrorand no following user message, while auto-resume scanned sessions but resumed none.