@@ -131,6 +135,26 @@ export function WorkspaceClient({ workspaceId }: WorkspaceClientProps) {
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}
+