Skip to content

[Bug]: Stop can't end background work after a run fails before its provider starts ("Run … is not interruptible") #15472

Closed

Description

@vitalyiegorov

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

  1. Let a turn finish while it leaves background work running (here a gh pr checks --watch shell). The composer shows Running: … Stop.
  2. Send a message that fails before the provider starts. Here it was the refusal from [Bug]: Claude refuses every message as a "model or setting change" when a thread moves between mobile and web while background work runs #15471.
  3. Press Stop on the background work banner, or in the composer.

Expected behavior

Stop ends the background work, as it does when the newest run completed normally.

Actual behavior

A toast says Run run:thread:<id>:ordinal:18 is not interruptible. The work keeps running and the banner stays. Each new message adds another failed run, so the thread is stuck until the work ends on its own.

Cause

With no active run, interruptThreadTurn (packages/client-runtime/src/operations/commands.ts) sends run.interrupt for the newest run, because the thread shows pending background work. That's the right target: the server only reaches background work through the newest run (hasBackgroundWork in dispatchRunInterrupt, apps/server/src/orchestration-v2/Orchestrator.ts).

The handler then looks for a provider turn of that run's attempt. A run that failed before its provider started has none, so it rejects the run as not interruptible. The work belongs to an earlier turn of the same provider thread.

Suggested fix

In dispatchRunInterrupt, when the run has background work but no provider turn of its own, use the provider thread's latest turn. Its session owns the work, and settled-turn interrupts already work this way: Claude closes the CLI process for the native thread, and the settle follow-up ends what's left. It's server-only; the client already sends the right run. I can open the PR.

Impact

Major degradation or frequent failure

Version or commit

t3@0.0.46-nightly.20261004.2644 (main 8fb068c)

Environment

Linux host (systemd service), macOS desktop client.

Screenshots, recordings, or supporting files

Stop on the running shell is rejected for the failed run 18:

Run …:ordinal:18 is not interruptible toast above the Running banner

Workaround

Wait for the background work to end on its own, or restart the server.

Related

Activity

  1. vitalyiegorov commented on Oct 4, 2026

    @vitalyiegorov
    ContributorAuthor

    PR opened: #15474. When a stopped run has background work but no provider turn of its own, dispatchRunInterrupt now falls back to the provider thread's latest turn. The existing Stop integration test now stops a run that failed before its provider started; it fails on main with this exact error.

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