Skip to content

Claude Code: foreground Bash commands show as background tasks, and a steer waits behind them #5641

Closed

Description

@ryanbbrown

Problem

A Claude Code thread can show a long foreground Bash command as a background command. The user then thinks the agent is free to answer. It is not: the agent is blocked until the command finishes, so a steer message waits.

There is also no control to move a running foreground command to the background, so the user cannot keep talking without stopping the turn.

What happened (BB 0.46.1, provider-claude-code)

  1. The agent made a Bash tool call with only command, description and timeout: 400000. It did not set run_in_background.
  2. Claude Code sent a task_started message (task_type: local_bash) for that command. BB recorded item/started with type: "backgroundTask", and the UI showed the command as a background command.
  3. The user sent a message. BB delivered it as target: { kind: "steer" }. Claude Code queued it until the command finished.
  4. The command finished 3 min 48 s later. The tool result came back inline in the same turn, and only then did the agent read the user's message.

From the user's view, the thread showed "Working" with a background command and did not answer for minutes.

Cause

plugins/provider-claude-code/src/task-translation.ts: isMaterializedTaskType materializes every local_bash task as a backgroundTask item. It does not check whether the tool call ran in the background. A foreground Bash command that runs long enough to get a task message is shown as a background task.

Expected

  • A foreground Bash command shows as a running foreground command (the agent is blocked), not as a background task.
  • When the agent is blocked on a foreground command, the composer makes clear that a steer waits until the command finishes, and that stop cancels it.
  • Optional: a control to move the running foreground command to the background (as Ctrl+B does in the Claude Code terminal UI), if the SDK supports it, so the user can keep talking without cancelling the work.

Related: #1585 (keyboard control for running threads).

Activity

  1. added theissue type on Oct 16, 2026
  2. added
    providers
    threads
    provider-claude-code
    partial-repro
    on Oct 16, 2026
  3. bb-slop-cop commented on Oct 16, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    • Classification: Bug · Medium priority · Medium effort. Added providers, threads, and provider-claude-code; no existing classification was replaced.
    • Reproduction report: PARTIALLY REPRODUCED, with high confidence in the classification defect; reproduction label: partial-repro.
    • Root cause: The Claude translator materializes every local_bash task as background work without checking foreground/background state. A focused test fails identically in two clean trusted-main checkouts, including explicit foreground metadata. Live UI behavior and steer latency remain unverified.
    • No PR: A local candidate passes all 24 task tests, but the full provider suite has five failures also present on untouched main, so the automatic-fix test gate was not met. Nothing was pushed to the product repository.

    AGENT GENERATED

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

    partial-reproprovider-claude-codeprovidersthreads

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions