Repository navigation
Description
The workflow
Users should be able to keep bb up to date without manually stopping and restarting their agents. For people who run agents occasionally, bb can wait for work to finish and update during a quiet period. However, power users may always have an agent working or monitoring a background job. A migration might run for days, so waiting for every agent to finish may mean postponing updates indefinitely.
The update also needs to reach the right installation. A desktop app can connect to a remote server, and updating that app does not necessarily update the server. Therefore, the flow should identify which installation will update and recover the work affected by its restart.
What happens today
The existing update when agents finish request addresses deferred scheduling. That would help users who have regular idle periods. However, the feedback about continuously running agents shows why we also need a way to update while work is active.
At the inspected main commit, bb asks users to confirm that an update will interrupt their running threads (update service). As a result, users must accept the interruption or keep postponing the update. This behavior was checked in source; no live update was performed for this proposal.
What you would expect
Offer two choices:
- Wait until idle: bb schedules the update and applies it when the affected work is idle. While waiting, users can see the pending update, cancel it, or switch to Update now. If new work starts before the restart, bb keeps waiting rather than interrupting it.
- Update now: bb interrupts the affected work, installs the update, and automatically resumes the agents afterwards. This lets continuously busy users update without waiting for an idle window or visiting every thread to say “continue.”
Update now should recover from recorded session state, following the Workflows model. Because that state already exists, agents should not need to write a summary or acknowledge a save request before bb can restart.
The transition should work as follows:
- Record which sessions will be interrupted and which commands they are running.
- Hold new work and incoming messages while stopping the affected work and installing the update.
- After the restart, resume each affected thread once per update. Start those resumptions a few seconds apart so every agent does not wake at once.
- Deliver each thread's held messages after its resumption message, preserving their order.
Each resumption message should explain that bb updated and identify the interrupted command, when known. The agent can then check whether that command completed, partly completed, or never ran before deciding how to continue. This check matters because repeating a partly completed command may duplicate its effects.
Long-running background jobs need the same care. Resuming an agent session does not keep its underlying processes alive. For example, a migration may stop midway through an update. Its agent should inspect the migration's progress and restart it only when safe; otherwise, it should explain what needs attention. Keeping such jobs running uninterrupted through updates is a separate capability, related to the daemon restart issue.
Recovery should also follow two rules:
- Automatic resumption applies to the update the user requested. Automatic recovery after a crash is separate scope.
- An update interruption must not also trigger a provider-error retry. Otherwise, two recovery paths could try to resume the same work.
Acceptance should cover:
- Update controls: both choices work through Settings, CLI and SDK on supported desktop-hosted and standalone servers. Each surface makes clear which installation will update.
- Idle scheduling: bb rechecks for active work immediately before restarting. Work that starts during download or while the update is waiting defers the restart.
- Session recovery: Claude Code, Codex, Pi and ACP continue with their existing context. Held messages retain their order, and repeated startup or reconnect attempts do not create duplicate resumptions.
- Work in progress: verify long commands, background jobs on otherwise idle threads, and threads waiting for approval.
- Failure handling: cancellation or an update failure releases held work. After an update, users can see that it completed and whether any threads failed to resume.
Before implementation, define whether pending approvals and background jobs prevent an installation from counting as idle. The recommended default is that both do, so choosing Wait until idle does not interrupt work that merely appears inactive.
Context and alternatives
This issue expands on update when agents finish. That request remains the reference for deferred scheduling. This broader proposal also covers updating while agents are busy, resuming their sessions, and handling interrupted jobs or failed recovery.
The earlier discussion suggested combining the two modes and asking agents to save a summary before restarting. This proposal retains idle scheduling as its own choice. For immediate updates, it uses the session state bb already records, removing the need for a separate save-and-summarize step.
Related work:
-
Automatic-resume PR: a draft implementation of session recovery after updates; it has not shipped.
-
Update safety guidance: explains what an update will restart or interrupt before the user acts.
-
Workflows durability model: provides the precedent for recovering from completed work. It does not guarantee that an arbitrary command will survive a restart.
-
Searched open and closed issues; related requests are linked above.
BB-Thread-ID: thr_x3f8xgpuvw
AGENT GENERATED
Activity
bb-slop-cop commentedon Oct 22, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotApplied classification: Type: Feature · Priority: Medium · Effort: High.
Labels added:
desktop,threads. No existing classification values or labels were present; none were replaced.This adds update scheduling and coordinated session recovery rather than correcting unexpected behavior. Manual update coordination remains a workaround; durable recovery across update paths and providers requires substantial design and verification.
No reproduction report or pull request: this is a feature request, outside the bug-only reproduction and simple-fix path.
feat(updates): update bb once all threads finish (#6203)
Resume threads a restart cut off (resumeThreadsAfterRestart experimen…
Title restart resume rows "Resume after bb restarted"
Resume threads whose background work a restart stopped, and say what …
Title restart resume rows "Resume after bb restarted"
Resume threads whose background work a restart stopped, and say what …
Title restart resume rows "Resume after bb restarted"
Say running threads resume when Update now restarts bb (resumeThreads…
Hold new sends while bb restarts into an update (updateWhenIdle) (#7003)
Resume threads whose background work a restart stopped, and say what …
Title restart resume rows "Resume after bb restarted"
Resume threads whose background commands a restart stopped, and tell …
Let users turn on automatic bb updates that install once threads fini…