GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [Bug]: ACP session/prompt resolves end_turn before the turn completes; session/update notifications continue after the response · Issue #63096 · anomalyco/opencode

[Bug]: ACP session/prompt resolves end_turn before the turn completes; session/update notifications continue after the response #63096

New issue
Copy link
New issue
Copy link
Closed as duplicate
Closed as duplicate
[Bug]: ACP session/prompt resolves end_turn before the turn completes; session/update notifications continue after the response#63096
Copy link
Labels
pending closetriaging

Description

@paulovlobato
paulovlobato
opened on Nov 10, 2026
Issue body actions

Description

session/prompt resolves with stopReason: "end_turn" before the turn is complete. OpenCode keeps sending session/update notifications (tool calls, assistant text) after the RPC response, so an ACP client that treats the response as the terminal event finalizes the turn early and drops the rest of the output.

This is the ordering violation described in #17505 and likely the same lifecycle area as #53914. It reproduces on 2.2.6 on both a fresh ACP session and a resumed one.

The first failing turn used github-copilot/claude-sonnet-5, so the copilot-auto plugin's auto hook was not active; the plugin list below is for completeness, not the cause.

Plugins

Orca status hooks; @dietrichgebert/ponytail; @opeoginni/opencode-copilot-auto (installed, but the claude-sonnet-5 failure bypasses its auto hook).

OpenCode version

2.2.6 (channel=latest, opencode --version)

Steps to reproduce

  1. Start opencode2 acp over stdio; send initialize.
  2. Send session/new.
  3. Send session/set_config_option for model and effort, then session/prompt with a multi-step prompt that uses tools (the /review prompt).
  4. Observe the session/prompt response order.

Expected: the response arrives after the turn ends and after all session/update notifications.

Actual: end_turn arrives first. In two Orca sessions the client closed the turn 11–12 ms before OpenCode created the user message:

  • resumed session ses_e3afae31effew41aq8zZaZPUhg: client turn end 11:41:46.851, OpenCode user message 11:41:46.862, tool/assistant output until 11:42:10.495.
  • fresh session ses_e3ad3edc8ffeqSUXqVtX65J8cI: client turn end 12:16:02.326, OpenCode user message 12:16:02.338, output until 12:16:29+.

A direct ACP probe of the same prompt with the model/effort writes sent back-to-back returned end_turn at 3.7 s while the assistant was still streaming; a second identical run produced no response for 120 s while the turn kept running. The early result is racy, not deterministic.

Client-side evidence: stablyai/orca#40748

Screenshot

N/A

Operating System

Linux (Ubuntu 24.04.5)

Terminal

Orca 1.4.255 native chat, ACP over stdio

Activity

  1. opencodejr commented on Nov 10, 2026

    @opencodejr
    opencodejrBot
    on Nov 10, 2026
    Contributor
    More actions

    Thanks for the detailed timing data. I think this is a duplicate of #54371.

    /review is a built-in command, so it goes through ACP's slash-command path. In 2.2.6, packages/cli/src/acp/turn.ts returns from session/prompt as soon as the command has been submitted (if (prompt.command) return "succeeded"). It doesn't wait for the turn's events, so end_turn reaches the client before OpenCode creates the user message. That fits the 11–12 ms gap you measured and the output that keeps going after the response.

    Possible duplicates and related issues, ordered by likelihood:

    • ACP: slash commands execute but never stream their output #54371: ACP slash commands run, but session/prompt returns end_turn at once and their output isn't streamed as part of the turn. Confirmed on 2.2.5 with several clients.
    • ACP ends registered-command streaming before later execution cycles finish #53914: ACP ends registered-command streaming before the command's later execution cycles finish (same command code path).
    • session/update notifications sent after session/prompt response (end_turn) #17505: the same ordering problem reported on v1 (1.2.21), now closed.
    • ACP: parent's auto-resumed turn after background subagent completion emits zero session/update (dropped by background turn) #55760: a parent turn that resumes after a background subagent finishes sends no session/update to the client.

    The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different. In particular, please say if plain prompts that don't start with / also get an early end_turn, or if your 120 s no-response probe wasn't a slash command. That would point to a separate problem.

  2. opencodejr
    added
    pending close
    triaging
    on Nov 10, 2026
  3. paulovlobato commented on Nov 10, 2026

    @paulovlobato
    paulovlobato
    on Nov 10, 2026
    Author
    More actions

    Confirmed duplicate of #54371 (and the multi-cycle case in #53914). The Orca client sent /review ... as a slash command; OpenCode expanded it into the reviewer body, returned end_turn immediately, and the command then ran. Orca's journal holds the raw /review prompt, while OpenCode's session_message holds the expanded command body created after the response — exactly the prompt.command early return in packages/cli/src/acp/turn.ts. Closing as a duplicate; #49208 / #53914 are the fix path.

  4. paulovlobato
    closed this as not plannedon Nov 10, 2026
  5. opencodejr commented on Nov 10, 2026

    @opencodejr
    opencodejrBot
    on Nov 10, 2026
    Contributor
    More actions

    Thanks for checking. Your journal and session_message comparison confirms this is the slash-command early return. The bot will close this issue as a duplicate of #54371 as planned.

    To follow progress, watch #54371 and #53914. #49208 tackled this lifecycle, but it was closed without being merged.

  6. opencodejr
    closed this as duplicateon Nov 11, 2026
  7. opencodejr commented on Nov 11, 2026

    @opencodejr
    opencodejrBot
    on Nov 11, 2026
    Contributor
    More actions

    Closing this as a duplicate of #54371, as you confirmed: /review goes through ACP's slash-command path, and session/prompt returns end_turn before the command's turn has run.

    To follow progress, watch #54371, and #53914 for the multi-cycle command case. Thanks for the detailed timing data and for checking it against your journal. If plain prompts that don't start with / also get an early end_turn, please open a new issue with those details, since that would be a separate problem.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    pending closetriaging

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.