You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: Expose message-free session resume to V2 plugins #58390
In OpenCode V2 2.1.3, core has a message-free Session.resume operation, but plugins cannot call it. A custom continuation command currently has to admit a synthetic message, which adds an instruction to the model's context.
Please expose the existing resume operation to plugins, for example ctx.session.resume({ sessionID }), so a plugin can start or join primary execution from existing history without admitting another conversation message. Preserve native session validation, permissions, cancellation, and completed tool results.
Related: #52496 adds HTTP/client resume but does not expose it through the plugin session interface. #44921 requests a native continuation command. The earlier API request #46198 and PR #46197 were closed without merging.
Could maintainers approve this plugin API addition? I'd like to implement it after design approval.
Thanks for the detailed request! To restate it: you'd like plugins to be able to call the existing message-free session resume, e.g. ctx.session.resume({ sessionID }). A plugin could then start or join primary execution from the existing history without adding a synthetic message to the model's context.
I checked the code. Core has Session.resume, but the plugin session interface (SessionDomain in @opencode/plugin) doesn't include it, and SessionApi in the client doesn't have a resume method yet either. So a plugin today can only add a message (prompt/synthetic) or use interrupt({ resume: true }), which cancels first. Supporting this would mean adding resume to SessionApi and to the plugin SessionDomain for both the Promise and Effect versions. It should keep the native session validation and errors.
Maintainers will look at this and decide on the design. Related items:
Activity
opencode-agent commentedon Oct 23, 2026
Thanks for the detailed request! To restate it: you'd like plugins to be able to call the existing message-free session resume, e.g.
ctx.session.resume({ sessionID }). A plugin could then start or join primary execution from the existing history without adding a synthetic message to the model's context.I checked the code. Core has
Session.resume, but the plugin session interface (SessionDomainin@opencode/plugin) doesn't include it, andSessionApiin the client doesn't have aresumemethod yet either. So a plugin today can only add a message (prompt/synthetic) or useinterrupt({ resume: true }), which cancels first. Supporting this would mean addingresumetoSessionApiand to the pluginSessionDomainfor both the Promise and Effect versions. It should keep the native session validation and errors.Maintainers will look at this and decide on the design. Related items:
sessions.resume(), which the plugin domain could build on