Skip to content

[BUG] Queued SessionPrompt.loop() callers can hang forever on cancel/dispose #14565

@neriousy

Description

@neriousy

Description

When a session is already busy, SessionPrompt.loop() returns a Promise and pushes its { resolve, reject } handlers into state()[sessionID].callbacks. If the session is cancelled (or the instance is disposed) while callbacks are queued, we abort/delete state but never reject those queued promises. Concurrent callers can wait forever.

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

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