Skip to content

Stop a single background command from the thread UI #6553

Description

@timurkhakhalev

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 Query has stopTask(taskId) (stop_task control 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 normal task_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:

Related:

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

  1. added
    threads
    ui
    provider-claude-code
    on Oct 29, 2026
  2. bb-slop-cop commented on Oct 29, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    Applied classification:

    • Type: Feature
    • Priority: Medium — useful lifecycle control, with agent-assisted and whole-thread workarounds.
    • Effort: High — requires coordinated UI, CLI, server/daemon, and provider capability support.
    • Labels: 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.

  3. jorgelaranjo commented on Nov 24, 2026

    @jorgelaranjo

    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.

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

    provider-claude-codethreadsui

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions