Skip to content

[Bug]: After Settle stops a thread's background server, the thread still shows "Waiting" with a Stop button #15239

Description

@Vantrongs

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. In a Claude thread, have the agent start a server as a background task (python3 -m http.server 8765 with run_in_background) and end its turn. The composer shows the Waiting strip with a Stop button.
  2. Settle the thread.
  3. Check the server's port and look at the thread.

Expected behavior

Settle stops the server, and the thread no longer shows the Waiting strip or the Stop button.

Actual behavior

Settle does stop the server: about two seconds after thread.settle the provider log shows query.close, and the server's whole process chain is gone. But the Waiting strip and its Stop button stay. Pressing Stop afterwards closes nothing, since no provider process is left, and only then does the strip go away.

Settle reaches the adapter through provider-session.detach, which closes the session scope, and closeSession only closes the query. The step that clears the thread's background work, thread.background-work.settle, is dispatched only after an interrupt (EffectWorker.ts), that is, only on Stop. So the thread keeps showing work no process will report on, which the settle comment says must not keep running after Settle.

A possible fix is to dispatch the same thread.background-work.settle after the detach that Settle and archive trigger.

Impact

Minor bug or occasional failure

Version or commit

0.0.46-nightly.20261003.2623 (fed41fa)

Environment

Desktop app on Linux (NixOS, Wayland, niri); Claude Code 2.1.288

Logs or stack traces

No response

Screenshots, recordings, or supporting files

No response

Workaround

No response

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

    bugSomething is broken or behaving incorrectly.via-triageFiled through npx t3 triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions