@@ -89,7 +89,7 @@ export function WorkFolderBrowser({ owner, exampleFiles, readOnly = false, fillH
{!trash && canManageTrash && checkedPaths.length > 0 && }
{!readOnly && }
- {saving ? "Saving…" : saveFailed ? "Save failed" : "Saved"}
+ {saving ? "Saving…" : mutation.isError ? "Save failed" : failed ? "Run save failed" : "Saved"}
{lastSaved && Last agent save {new Date(lastSaved).toLocaleTimeString()}}
{lastOperation && (!lastSaved || lastOperation > lastSaved) && Files updated {new Date(lastOperation).toLocaleTimeString()}}
@@ -98,7 +98,10 @@ export function WorkFolderBrowser({ owner, exampleFiles, readOnly = false, fillH
+ A sandbox run could not save its files. The files below are saved copies. {failed.error}{" "}
+ {failed.agentId && View failed run}
+
}
Deleted cached files are retained here. Restore them to return them to Files.
{files.length === 0 ? Trash is empty.
: files.map((file) =>
{file.path}{canManageTrash && }
diff --git a/ui/storybook/fixtures/workFolders.ts b/ui/storybook/fixtures/workFolders.ts
index 5f8d5e183a..4cd3be96e2 100644
--- a/ui/storybook/fixtures/workFolders.ts
+++ b/ui/storybook/fixtures/workFolders.ts
@@ -9,6 +9,7 @@ export type WorkFolderScenario =
| "saved"
| "saving"
| "failed"
+ | "olderFailure"
| "empty"
| "loading"
| "unavailable"
@@ -147,6 +148,7 @@ export function createWorkFolderFixture(
if (action === "sync") {
const status: WorkFolderSyncStatus = {
runId: "run-storybook",
+ agentId: workFolderOwners.agent.ownerId,
state:
scenario === "saving"
? "saving"
@@ -161,7 +163,11 @@ export function createWorkFolderFixture(
? "Storage is unavailable. Your working files are retained in the sandbox; retry when storage recovers."
: null,
};
- return Response.json([status]);
+ return Response.json(scenario === "olderFailure" ? [status, {
+ ...status, runId: "earlier-run-storybook", state: "failed", active: false,
+ lastSavedAt: "2026-09-07T14:00:00.000Z",
+ error: "An earlier sandbox could not reach storage. Its working copy was retained.",
+ }] : [status]);
}
if (action === "refresh") return Response.json({ ok: true });
if (!action) {
diff --git a/ui/storybook/stories/work-folders.stories.tsx b/ui/storybook/stories/work-folders.stories.tsx
index 202879be44..128bb9efa3 100644
--- a/ui/storybook/stories/work-folders.stories.tsx
+++ b/ui/storybook/stories/work-folders.stories.tsx
@@ -32,6 +32,7 @@ const meta = {
"saved",
"saving",
"failed",
+ "olderFailure",
"empty",
"loading",
"unavailable",
@@ -100,6 +101,7 @@ export const EmptyFolder: Story = { args: { scenario: "empty" } };
export const Loading: Story = { args: { scenario: "loading" } };
export const Saving: Story = { args: { scenario: "saving" } };
export const SaveFailed: Story = { args: { scenario: "failed" } };
+export const SharedFolderWithEarlierFailure: Story = { args: { scope: "agent", scenario: "olderFailure" } };
export const StorageUnavailable: Story = { args: { scenario: "unavailable" } };
export const UploadFailed: Story = {
args: { scenario: "uploadFailed" },