Repository navigation
Description
Summary
In a claude-code thread, a background shell command (Bash run_in_background) was running when a sent message in the thread was edited. BB started a new Claude Code session for the thread; the old process and its background command ended, but the background task was never completed in BB, so the thread still shows "Running background command: …" with its timer counting (over 24 h now). Expected: the task settles (interrupted or stopped) when the session that owned it is replaced, or the card can be dismissed.
Versions and environment
- bb 0.46.0 (desktop app, self-updating) now; the version at the time of the edit (2026-10-13 09:18 CEST) was not recorded
- macOS 26.6.2, Apple silicon
- claude-code provider, claude 2.1.296
- project checkout environment on the local (server) machine; a second machine is enrolled but not involved
Steps to reproduce
Observed once; not reproduced on 0.46.0.
- In a claude-code thread, the agent starts a long background command (a ~25 GB download) with Bash
run_in_background. - While it runs, the user presses Escape on a turn and edits a sent message (
edit_message, cutoff sequence 140146). - BB records
thread/identitywith a newproviderThreadId; the old Claude process ends, and the background command with it.
On 0.46.0, bb thread edit-message with an open background task returns HTTP 409: Wait for background work to finish before editing the message, so step 2 could not be recreated through the CLI.
Did not reproduce with (0.46.0, scratch thread): bb thread stop mid-turn (the task settles as interrupted); ending the thread's claude process and sending a new message (the same session is resumed and the task settles as interrupted). Not tested: Escape plus an edit through the desktop UI on 0.46.0.
Expected vs actual
Actual, from `bb thread log thr_su4uzy5jq8 --json`:
seq 140033 10-13 08:58 item/started backgroundTask status=pending "Pull the vanilla macOS Tahoe VM image" providerThreadId 672dd832…
seq 140171 10-13 09:18 system/operation edit_message completed (cutoffSequence 140146)
seq 140173 10-13 09:18 thread/identity providerThreadId 27cbdd8d…
(no item/backgroundTask/completed for that task afterwards)
UI on 2026-10-14: "Running background command: Pull the vanilla macOS Tahoe VM image 24h 45m 20s". No such process exists on the machine.
Expected: an item/backgroundTask/completed (interrupted or stopped) when the session that owned the task is replaced, as already happens for `bb thread stop`.
Evidence
- Thread ids:
thr_su4uzy5jq8(affected thread);thr_5rqcvr6ty8(scratch repro attempts on 0.46.0: background task started at seq 26, 81 and 117; settled asinterruptedat seq 68 and 91). - After the switch, the new Claude Code session reported the task (its own id
blwnt876v) as having not finished before the previous session ended, so the provider knew; BB never recorded a completion. - Related: Fix orphaned background command activity #1736 settles open background tasks when a successful thread stop unloads the runtime. A session replaced by a message edit seems not to be covered, at least before the 409 guard.
What you ruled out
- Not Fix orphaned background command activity #1736: that covers thread stop; here the task outlived an edit that replaced the session.
- Not a live process: none exists on the machine, and the new Claude session's own task stop reports no such task.
- New cases may already be prevented by 0.46.0's edit guard (409); the existing orphaned card still cannot be cleared.
- Suggested priority: Low. A stale card with a misleading timer; no data or work lost. A cleanup on
thread/identitychange, or a way to dismiss orphaned cards, would fix it.
AGENT GENERATED: by lab-chief (Claude Opus 5.5, claude-code) in the reporter's bb thread
thr_su4uzy5jq8(private).
Suggested priority and effort (optional)
No response
Checks
- I reproduced this on the latest release or on
main, or I say above that I could not. - I searched open and closed issues for the same problem.
- If an agent wrote this, the body ends with
> AGENT GENERATEDand links the thread or report.
Activity
bb-slop-cop commentedon Oct 14, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotthreadsandprovider-claude-code; no existing classifications were replaced.partial-repro.Keep background work settlements across message edits (get-bb#5656)