You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(vm): restarting a stopped sandbox re-resolves its image tag under the preserved overlay #6186
Restarting a stopped VM sandbox re-resolves its image tag. provision_sandbox_inner with PreserveExisting passes the original reference (usually a tag) to prepare_images_in_worker, which does a fresh HEAD and uses whatever digest the tag points to now. If the tag moved while the sandbox was stopped, the preserved overlay is mounted over a different lower image than the one it was written against. image-identity is overwritten without any event.
The same path also means a restart needs the registry even when the disk is already cached. rootfs_tar_path sandboxes already avoid this by reusing the persisted identity.
Impact / Why This Matters
A restarted sandbox can end up with a mixed root filesystem (for example a package database copied up from the old image next to the new image's libraries). The only workaround is pinning every image by digest at create time.
Proposed Design
Record the digest-pinned reference (repo@sha256:...) when the overlay is first prepared, and resolve that on restart instead of the tag. A cached, digest-pinned prepared disk is used without a registry call, the same rule the bootstrap cache follows since #4582. Sandboxes without a recorded pin behave as today. Local Docker/Podman images are out of scope.
Alternatives Considered
Reuse the persisted image-identity disk directly. This breaks after an upgrade, because the prepared-disk identity includes the OpenShell version.
Refuse to restart when the tag moved. Every stopped sandbox would fail after a routine image push.
Acceptance Criteria
A sandbox created from a registry tag restarts on the same digest after the tag moves.
A restart from a cached, pinned disk makes no registry request.
A pin for another repository, or one without a digest, is rejected.
Activity
137137137 commentedon Dec 3, 2026
Fix is in ai-openshell/desktop#18, since the VM driver now lives there.