Skip to content

Resume threads after a bb update interrupts them - #6098

Closed
brsbl wants to merge 3 commits into
app-update-telemetryfrom
bb/design-spec-for-updating-bb-without-losing-work-thr_dkhi97ntbw
Closed

brsbl wants to merge 3 commits into
app-update-telemetryfrom
bb/design-spec-for-updating-bb-without-losing-work-thr_dkhi97ntbw

Conversation

@brsbl

@brsbl brsbl commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

Updating bb restarted the server and host daemon, which killed every running agent turn. Each thread ended with "Thread interrupted… Please retry the thread to continue", and nothing resumed it.

What changed

  • Update with threads running asks once, then stops those threads and restarts right away. There's no extra wait or interstitial.
  • Before the restart, bb records the command each thread was running.
  • After the restart, each interrupted thread gets one system message that starts a new turn: bb restarted while you were running <command>, it may be half applied, check it, then continue. Threads with no running command are asked to check whether their last step finished.
  • Resumes start 10 seconds apart per host.
  • Threads that start while bb is stopping the others also get a resume message. So do idle threads whose background jobs on the server's own machine stop at the restart; their message names the jobs.
  • The update dialog counts the running threads and says they stop now. The toast after the update counts the resumed threads.
  • Desktop Relaunch goes through the same flow when the desktop hosts the server.
  • No server/daemon wire changes. Each provider continues through its existing session resume.

How you verified

  • Server tests cover recording each thread's open command, parking and releasing resume messages with the per-host stagger, and releasing them when the launcher rejects the restart.
  • Remote CI, end-to-end runs and refreshed screenshots on the final head: pending.

BB-Thread-ID: thr_dkhi97ntbw

AGENT GENERATED

🤖 Generated with Claude Code

@brsbl
brsbl force-pushed the bb/design-spec-for-updating-bb-without-losing-work-thr_dkhi97ntbw branch from 05da5db to 5bd6182 Compare October 22, 2026 02:14
@brsbl
brsbl changed the base branch from main to app-update-telemetry October 22, 2026 02:14
@brsbl
brsbl added this pull request to stack #6100 October 22, 2026 02:14
Updating while threads run stops them and restarts right away. bb records
the command each thread was running and, once it is back, sends each
interrupted thread one message naming that command so the agent checks it
and continues. Resumes start 10 seconds apart per machine. Idle threads with
background jobs on the server's machine are told which jobs stopped.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@brsbl
brsbl force-pushed the bb/design-spec-for-updating-bb-without-losing-work-thr_dkhi97ntbw branch from eec6603 to 6e449af Compare October 22, 2026 03:57
@brsbl brsbl changed the title Save running agents' work before an app update and resume them after Resume threads after a bb update interrupts them Oct 22, 2026
brsbl and others added 2 commits October 22, 2026 04:02
A run that fails while its thread has a parked update resume is not
announced as turn.failed, so provider retry never retries it on top of the
resume. The resumed turn is an ordinary first attempt for provider retry.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

This is an automated message. We have closed this pull request because it has been open for more than two weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant