@@ -131,6 +135,26 @@ export function WorkspaceClient({ workspaceId }: WorkspaceClientProps) {
From eb87f5b6790701b0341b7f84b0a1fb208b9706de Mon Sep 17 00:00:00 2001 From: "vercel-gh-bot-4[bot]" <312518292+vercel-gh-bot-4[bot]@users.noreply.github.com> Date: Sat, 29 Aug 2026 17:49:51 +0000 Subject: [PATCH] fix: Show workspace failure details --- apps/factory/agent/channels/workspace.ts | 6 +- apps/factory/app/workspace-client.tsx | 118 ++++++++++++++++---- apps/factory/app/workspace-types.ts | 71 ++++++++++++ apps/factory/tests/workspace-types.test.mjs | 57 ++++++++++ 4 files changed, 228 insertions(+), 24 deletions(-) diff --git a/apps/factory/agent/channels/workspace.ts b/apps/factory/agent/channels/workspace.ts index 65ee19e35dc6d..1834fb183b190 100644 --- a/apps/factory/agent/channels/workspace.ts +++ b/apps/factory/agent/channels/workspace.ts @@ -94,7 +94,11 @@ export default defineChannel< headers: { "cache-control": "no-store" } }); } catch (error) { - await failWorkspace(id, "Could not start the Eve workspace session."); + const reason = + error instanceof Error && error.message.trim() + ? `Could not start the workspace session: ${error.message.trim()}` + : "Could not start the workspace session."; + await failWorkspace(id, reason); throw error; } }) diff --git a/apps/factory/app/workspace-client.tsx b/apps/factory/app/workspace-client.tsx index 9daeb086a2a4c..51029eb80f9f4 100644 --- a/apps/factory/app/workspace-client.tsx +++ b/apps/factory/app/workspace-client.tsx @@ -48,7 +48,11 @@ import { import { sandboxSshCommand } from "../agent/lib/sandbox-ssh"; import { CopyCommand } from "../components/copy-command"; import { Button } from "../components/ui/button"; -import type { PublicWorkspace } from "./workspace-types"; +import { + latestWorkspaceFailure, + type PublicWorkspace, + type WorkspaceFailure +} from "./workspace-types"; const CONSOLE_HEADERS = { [OPERATOR_ACTION_HEADER]: OPERATOR_SESSION_ACTION }; const streamdownPlugins: PluginConfig = { @@ -123,7 +127,7 @@ export function WorkspaceClient({ workspaceId }: WorkspaceClientProps) {
); - if (!loaded?.workspace.sessionId) + if (!loaded) return (@@ -131,6 +135,26 @@ export function WorkspaceClient({ workspaceId }: WorkspaceClientProps) {
Workspace failed to start
++ {loaded.workspace.error} +
++ Starting workspace session… +
+ )} +{failureHeadline(failure)}
+ {failure.hint ? ( +{failure.hint}
+ ) : null} + {failure.detail ? ( +
+ {failure.detail}
+
+ ) : null}
+