Skip to content

Bug: Revert fails when session is busy/generating #14014

@14113p

Description

@14113p

Description

When a session is currently "thinking" (generating tokens/ pending retry / running tool etc), the "Revert" action in the message dialog fails silently, copying the revert message's text into the input box but keeping the conversation and all messages intact.

The backend rejects the revert request because the session is locked (SessionPrompt.assertNotBusy), but the UI attempts to update the editor state anyway. This results in the session continuing as if nothing happened, except for message text landing in the UI input field.

Expected Behavior:
The "Revert" action should interrupt any ongoing process (abort the session) and then successfully revert to the selected message state.
This behaviour already exists for the 'undo' (session.undo) feature.

Plugins

N/A

OpenCode version

verified on the dev branch.

Steps to reproduce

  1. Submit a request to the model
  2. While the model is still pending, attempt to revert the message (easy to simulate when hitting quota limits and with models/requests requiring longer thinking)
  3. Observe the input box and the selected message

Screenshot and/or share link

Screen.Recording.2026-02-17.at.19.22.29.mov

Operating System

macOS

Terminal

Ghostty

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcoreAnything pertaining to core functionality of the application (opencode server stuff)

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions