镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

[Bug]: OpenCode abort timeout does not enable Force stop #30987

Open

Description

@nima20002000

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

Code-derived reproduction, not executed:

  1. Start an OpenCode turn and wait until prompt admission has completed.
  2. Keep the turn active and withhold terminal events.
  3. Configure client.session.abort to remain pending until its request is cancelled.
  4. Request Stop and allow the adapter’s 10-second abort timeout to expire.
  5. Keep the same behavior for subsequent interrupt attempts.

Expected behavior

A timed-out abort should mark Stop unresponsive and offer Force stop.

Actual behavior

The adapter’s timeout fails before the session manager’s 15-second timeout. While the turn remains unfinalized, the adapter resets turn.interrupted and wraps the failure in ProviderAdapterInterruptError.

ProviderTurnControlService does not classify that error as unresponsive. The interrupt effect follows generic failure/retry handling, rather than enabling Force stop.

Impact

Minor bug or occasional failure

A provider that never answers abort can leave Stop unresolved without offering the intended Force stop recovery action. It needs a provider that doesn't confirm the stop (or the timing described above), so it is occasional rather than constant.

Version or commit

main @ 9e85538

Environment

OpenCode adapter with a controlled SDK endpoint. Runtime environment not tested.

Where


Found by reading the code while porting the Stop / Force stop changes (6b1245c, 5f2c27e) into a fork. Derived from the code at 9e85538; not reproduced at runtime.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions