Skip to content

prompt_async into a tool-executing turn aborts it and strands the new prompt #48175

Closed

Description

@JustinKeltner

Observed

A prompt_async delivered while the session's turn is executing a tool aborts the in-flight turn and drops the new prompt: the session dead-ends (user message present, no assistant reply, no new run). The same prompt delivered during the reasoning phase merges cleanly and is answered.

Repro (opencode 1.18.x, build agent)

  1. Dispatch a prompt whose first action is a long tool call (e.g. sleep 180 via bash).
  2. ~1 min later, while the tool is still executing, POST /session/:id/prompt_async a short follow-up.
  3. Sometimes: in-flight run aborted (MessageAbortedError-class kill, tool killed "User aborted the command") and the follow-up is never answered. Other times: the follow-up waits and is answered right after the tool finishes.

Race note

Observed tally across 5 certified mid-tool steers: abort+strand 1 / clean merge 4 (bash abort once; bash merge twice; MCP-tool merge twice). Timing/phase-dependent (step-boundary race), not tool-kind deterministic. A clean merge does not mean the path is fixed.

Expected

At minimum the steered prompt must start its turn (never silently dropped); ideally the abort card should not read as an error when the steer itself is the interrupter, or the dispatch should hold until the step boundary.

Context

Split out of openchamber/openchamber#3370 (defect 2), where the OpenChamber-side queue/steer defects are tracked separately. Happy to provide transcript timestamps on request.

Activity

  1. neriousy commented on Oct 19, 2026

    @neriousy
    Member

    In v2, prompt_async is replaced by POST /api/session/:sessionID/prompt, which stores the prompt and delivers it at the next step boundary without aborting a running tool. A prompt that arrives just as the current run is finishing starts a new run instead of being left unanswered. To get v2: npm i -g @opencode/cli@latest or curl -fsSL https://opencode.ai/v2/install | bash (desktop: update the app). If you still see this on v2, please open a new issue with the details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions