[Bug]: Stop can't end background work after a run fails before its provider starts ("Run … is not interruptible") #15472
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#
- Let a turn finish while it leaves background work running (here a
gh pr checks --watchshell). The composer shows Running: … Stop. - Send a message that fails before the provider starts. Here it was the refusal from #15471.
- 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 8fb068c498)
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:

Workaround#
Wait for the background work to end on its own, or restart the server.
Related#
maria-rcks closed this
Sign in to join this conversation.
PR opened: #15474. When a stopped run has background work but no provider turn of its own,
dispatchRunInterruptnow 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 onmainwith this exact error.