Skip to content

bb kills background tasks that span an idle gap between turns — bb 0.35.1, provider claude-code. #1127

Description

@sholub-dev

Based on bb self-debugging:

Steps:

  • Start a run_in_background job longer than one turn (~10 min).
  • Let the turn end.
  • Send any follow-up message.
  • Expected: still running.
  • Actual: taskStatus: "stopped", process gone, output file 0 bytes.

The replacement claude --resume process starts at the same second as the stopped event, in two independent threads. Environment-wide, so sibling threads lose their runs too.

bb does have a guard for exactly this (entryHasActiveRuntimeWork, with a comment saying background tasks must count as active work), and I verified its inputs are correct — bb emits item/started / backgroundTask / pending as the tracker expects. So the teardown is bypassing that guard, not failing it.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions