Skip to content

shell() doesn't await SessionRevert.cleanup() #10668

@noamzbr

Description

@noamzbr

Description

In session/prompt.ts, the shell() function calls SessionRevert.cleanup(session) without await, while prompt() correctly awaits it. This causes a race condition where operations immediately after shell() see stale revert state.
Fix: Add await at line 1352:

if (session.revert) {
  await SessionRevert.cleanup(session)  // missing await
}

Plugins

No response

OpenCode version

v1.1.31

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

MacOs 15.7.3

Terminal

Ghostty

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions