Before submitting
Area
apps/server
Steps to reproduce
- 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.
- Settle the thread.
- 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
Before submitting
Area
apps/server
Steps to reproduce
python3 -m http.server 8765withrun_in_background) and end its turn. The composer shows the Waiting strip with a Stop button.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.settlethe provider log showsquery.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, andcloseSessiononly 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.settleafter 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