Repository navigation
Description
The workflow
An agent starts a long-running server or watcher as a background command (Claude Code Bash with run_in_background), for example a dev server, a slidev preview or a CI watcher. Once I'm done with it, I want to stop that one command from the thread UI, from desktop or from the phone over bb Connect, without asking the agent and without opening a terminal.
What happens today
The background-commands card above the composer reads "Running background command: " with a timer, and nothing else. It offers no stop or kill action, on the card or in its unfolded list. The composer's Stop button shows only while a turn runs, so once the thread is idle nothing in the UI can stop the server.
Observed on bb 0.48.0 (desktop app, macOS 26.6.2) with a Claude Code thread. The card had been running for over 21 minutes, and I could not find a way to stop it from the UI.
Code on main at 3bacfac:
- The card only renders the rows, and its button only folds and unfolds the list: ThreadBackgroundCommandsCard.tsx#L165-L245
- The Claude Agent SDK
QueryhasstopTask(taskId)(stop_taskcontrol request), but nothing in bb calls it. There is no daemon command, server route or CLI command for stopping a single background task. - The only way to stop is a whole-thread stop (
bb thread stop <thr>, or the composer's Stop during a turn). That closes the provider session, and #6528 makes it reliably kill the shells. But it ends every task of the thread, not the one I chose.
What you would expect
- Each running row in the background-commands card has a Stop action. On touch screens it is a visible icon button; on desktop it may also go in a context menu.
- For Claude Code, Stop calls
query.stopTask(familyId). The task then settles through the provider's normaltask_notification stopped, and the card row moves to "Background command interrupted". - The same action exists in the CLI, e.g.
bb thread task stop <thr> <taskId>, so agents and scripts can use it too. - Providers that cannot stop a single task hide the action.
Context and alternatives
Workarounds today:
- Ask the agent in the thread to stop it (it uses
TaskStop). This costs a turn and only works if the thread can take a message. bb thread stop <thr>, which ends the whole session and every background task in it.- Kill the process by hand (
lsof -ti :<port> | xargs kill). This leaves the card stuck on "Running" (see An idle thread's background command stays "Running" after its machine is suspended: nothing settles a task whose owner process stops #6123 / Settle background tasks when the bridge, Claude Code or the daemon that owns them stops #6124).
Related:
- Allow vieweing real-time output of background commands #2572 asks for live output of background commands; a comment there also asks for a way to kill one. This issue is just the stop part, which is smaller and can ship on its own.
- Show every background command's duration and fold them from the row you clicked #6007 redesigns the card's rows but adds no actions.
- An idle thread's background command stays "Running" after its machine is suspended: nothing settles a task whose owner process stops #6123 / Settle background tasks when the bridge, Claude Code or the daemon that owns them stops #6124 settle tasks whose owner process died.
- Give everything the host daemon starts an owner that ends it #6528 gives each daemon-started process tree an owner.
Checks
- I searched open and closed issues for the same request.
- If an agent wrote this, the body ends with
> AGENT GENERATED.
AGENT GENERATED
Activity
bb-slop-cop commentedon Oct 29, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotApplied classification:
threads,ui,provider-claude-code.All classifications were missing; none were replaced. Verified the final Type and all applied values. This adds a new per-task control rather than repairing existing behavior, consistent with related background-task feature classifications. No reproduction report or pull request: non-bug feature requests are outside this rule’s report/fix path.
jorgelaranjo commentedon Nov 24, 2026
I hit this in the web app while running a paid benchmark. The background command banner showed the description and elapsed time, but I couldn’t stop that individual run from the UI. A Stop button on the banner would let me cut off spend right away without stopping the whole thread or waiting for the agent to act. Being able to open the command’s live output from the same banner, as requested in #2572, would also help me decide whether to let it continue.
Keep a backgrounded command running in the timeline and fold its outp…
Keep a settled turn's details on screen while its range grows
Settle Codex background commands when Codex stops running them
List every background command as a row with its duration and a Stop link
Stop a single background command from the thread banner, CLI and SDK (g…