different-ai/openwork · error · Error
OpenWork server is unavailable. Start or reconnect the serve
Error message
OpenWork server is unavailable. Start or reconnect the server before creating a workspace.
What it means
SessionRoute's workspace-creation flow fetches the workspace list via the OpenWork server (or client.createWorkspace for web). When every attempt fails or returns null, the code intentionally raises this error instead of proceeding with an undefined workspace list, because a workspace cannot be created without a reachable server.
Source
Thrown at apps/app/src/react-app/shell/session-route.tsx:2742
if (!folder) return;
const projectLabel = options?.projectLabel?.trim() ?? "";
setCreateWorkspaceBusy(true);
setCreateWorkspaceError(null);
try {
const workspaceName = folderNameFromPath(folder);
let list: WorkspaceList | null = null;
let createdOnServer = false;
if (client) {
list = await client
.createLocalWorkspace({ folderPath: folder, name: workspaceName, preset })
.then((serverList) => {
createdOnServer = true;
return serverList;
})
.catch(() => null);
}
if (!list) {
throw new Error("OpenWork server is unavailable. Start or reconnect the server before creating a workspace.");
}
const createdId = resolveWorkspaceListSelectedId(list) || list.workspaces[list.workspaces.length - 1]?.id || "";
let targetWorkspaceId = createdId;
let targetWorkspace = list.workspaces.find((workspace: WorkspaceInfo) => workspace.id === createdId) ?? null;
if (createdId) {
await workspaceSetSelected(createdId).catch(() => undefined);
await workspaceSetRuntimeActive(createdId).catch(() => undefined);
}
// First workspace on a fresh install: the OpenWork server was started
// engine-less (it only spawns OpenCode at boot when a workspace already
// exists), so sessions would hang forever. This boots the engine when
// it isn't running, same as the old /welcome flow did.
let sessionBaseUrl = baseUrl;
let sessionToken = token;
if (targetWorkspace && isDesktopRuntime()) {
await ensureDesktopLocalOpenworkConnection({
route: "session",
workspace: targetWorkspace,View on GitHub (pinned to 2b7df46e8a)
Solutions
- Start or reconnect the OpenWork server (desktop: restart it from the app; web: launch openwork-server locally) before retrying workspace creation.
- Verify the server is reachable at its configured baseUrl/port and no firewall or proxy blocks it.
- Check server logs for a crash and restart it; then retry the create-workspace action.
Example fix
// before
list = await client.createWorkspace(payload).catch(() => null);
if (!list) throw new Error("OpenWork server is unavailable...");
// after
if (!isServerReachable(await healthCheck())) await reconnectServer();
list = await client.createWorkspace(payload).catch(() => null); Defensive patterns
Strategy: try-catch
Validate before calling
const reachable = await fetch(`${serverBaseUrl}/health`).then(r => r.ok).catch(() => false);
if (!reachable) throw new Skip("server not running"); Type guard
function hasServerClient(c: unknown): c is { createWorkspace: (p: unknown) => Promise<WorkspaceList> } {
return typeof c === "object" && c !== null && "createWorkspace" in c;
} Try / catch
try {
await createWorkspaceAction();
} catch (e) {
if (e instanceof Error && e.message.includes("server is unavailable")) {
await reconnectServer(); // then retry once
} else throw e;
} Prevention
- Health-check the server before any workspace CRUD call.
- Auto-reconnect the local server handle on app focus/wake.
- Surface server status in the UI and disable create/connect actions while disconnected.
- Retry transient fetch failures instead of resolving to null silently.
When it happens
Trigger: Calling the 'create workspace' action while (a) running the web runtime and no `client` is configured, (b) the server request rejects (network down, server not started) and workspaceList() falls back to null via `.catch(() => null)`, or (c) the OpenWork server process has died so the list fetch resolves to null.
Common situations: Developer launches the web app without a running openwork-server; the local server crashed after sleep/restart; wrong server baseUrl in config; firewall or proxy blocking the server port.
Related errors
- OpenWork server is unavailable. Start or reconnect the serve
- OpenWork server is unavailable. Reconnect the server before
- OpenWork server is unavailable. Start or reconnect the serve
- OpenWork server is unavailable. Start or reconnect the serve
- latest-mac.yml is missing artifact path/url.
AI-assisted analysis of different-ai/openwork@2b7df46e8a (2026-09-01).
Data as JSON: /api/errors/d5e72627f74581c5.
Report an issue: GitHub.