Skip to content

Allow machine removal while preserving read-only thread history - #4090

Open
ymichael wants to merge 1 commit into
mainfrom
bb/unable-to-remove-machine-thr_u5bntygns4
Open

ymichael wants to merge 1 commit into
mainfrom
bb/unable-to-remove-machine-thr_u5bntygns4

Conversation

@ymichael

@ymichael ymichael commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

Explicit machine removal was blocked by unarchived threads, and persistent environment cleanup also prevented removing compute while retaining thread history. Threads whose machines had been removed could appear offline or errored and still expose controls that required the missing machine.

What changed

  • Allow explicit removal for both disposable and persistent machines, stopping active work and preserving threads as read-only history. Retain the host row as a tombstone so historical references remain intact. Automatic cleanup still respects live threads.
  • Propagate environment cleanup failures to machine removal and let Retry cleanup retry the failed environments before removing compute.
  • Expose the retained machine name and removal state through thread runtime data, including existing SDK and CLI reads. Show consistent removing, cleanup failed, and removed states across the sidebar, workspace details, and read-only composer banners; hide unavailable execution controls.
  • Record intentional interruption as host-removed, with “Stopped because the machine was removed” in the timeline. Bump HOST_DAEMON_PROTOCOL_VERSION to 217 for the shared wire schema change, following version 216 on main.
  • Update machine-removal CLI guidance, skills, and verification documentation. The existing remove command uses the same behavior as the UI.

How you verified

  • Passed pnpm exec turbo run typecheck --filter=@bb/server --filter=@bb/app, plus affected core UI, host daemon, thread view, and database typechecks.
  • Passed focused server tests for public host management, runtime status, machine lifecycle recovery, and provider orchestration. Coverage includes active/stopping threads, retained history, persistent machines, cleanup failure, and retry.
  • Passed focused app tests for removal dialogs/settings, sidebar states, read-only composer and banners, workspace display, and thread metadata.
  • Passed affected database lifecycle, core UI display, thread timeline, and host daemon contract tests. All test runs used Turbo with package and file filters.
  • Visually checked the three machine-removal banner states in the source Ladle story at desktop and narrow widths.
  • git diff --check passed.

AGENT GENERATED

@ymichael
ymichael force-pushed the bb/unable-to-remove-machine-thr_u5bntygns4 branch from 61c6409 to 696db52 Compare September 22, 2026 19:39

This branch has not been deployed

No deployments
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