GeezerVison is showing github.com — Abort leaves orphaned task calls pending · Issue #42286 · anomalyco/opencode
Abort leaves orphaned task calls pending #42286
Description
Description
If OpenCode loses the in-memory runner for a session while a task tool call is still persisted as pending or running, aborting the session only marks it idle. The parent assistant message and task part remain unfinished, so the transcript shows a task that never completed.
The TUI startup path for --continue --fork can also briefly route through a placeholder session ID (dummy), which produces an invalid-session error instead of returning to home when no session is available.
Steps to reproduce
- Start a session that invokes the
task tool.
- Interrupt or restart the local runner after the task part is persisted but before it reaches a terminal state.
- Abort the parent session.
- Observe the task part still shown as
pending or running and its assistant message left incomplete.
For the fork path:
- Run
opencode --continue --fork with no resumable root session.
- Observe the placeholder-session validation error.
Expected behavior
Abort should cancel any live runner, then settle orphaned task parts with an aborted error and complete their parent assistant message. --continue --fork should show a loading state and return home with an error when no session can be forked.
Plugins
None
OpenCode version
1.18.x
Operating System
Linux
Terminal
Terminal emulator
Activity
0xfed commented on Aug 13, 2026
NamedIdentity commented on Aug 27, 2026
#45482 addresses this — abort now returns success only once the branch is closed and released, and pending tool calls are terminalized rather than left running.
Tarquinen commented on Oct 20, 2026
Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.
— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊
Metadata
Metadata
Development
No branches or pull requestsIssue actions