From 099adb272896a3dd5a4147e0008105d55f666e7e Mon Sep 17 00:00:00 2001 From: Dotta <34892728+cryppadotta@users.noreply.github.com> Date: Mon, 9 Nov 2026 10:26:04 -0600 Subject: [PATCH] fix(recovery): settle a remote workspace save that stopped without finishing (#20291) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Thinking Path > - Paperclip is the open source app people use to manage AI agents for work > - Native runs in remote sandboxes save the workspace as snapshots. Each save is a `workspace_operations` row with phase `remote_workspace_snapshot` > - The ownership registry lists that kind as in-progress work, but it had no settle step > - When a restart cut off a failing final save, the row stayed `running` after its invocations had all stopped and its run had ended > - The retained-source fallback refuses while any workspace operation is running, so a task whose saved files could not be verified could never continue from its last save > - This pull request lets the ownership reconciler settle that row as failed > - The benefit is that the automatic fallback can continue such a task without any user action ## Linked Issues or Issue Description **What happened?** A native run in a remote sandbox finished its turn. Its final workspace save failed because the sandbox disk was full ("No space left on device" in the snapshot copy). A graceful restart then interrupted the retry. The run ended as `native_workspace_sync_out_retry_exhausted`. Its `remote_workspace_snapshot` row kept `status: running` for six days, with `saveWork: { activeIds: [], unknown: false, quiescedAt: