different-ai/openwork · error
OpenWork server is required to repair agent access to connec
Error message
OpenWork server is required to repair agent access to connected services.
What it means
For a managedBy 'openwork-connect' entry with a valid slug, the repair path requires the OpenWork server: canUseOpenworkServer true, an openworkClient instance, and an openworkWorkspaceId. If any is missing, the store throws 'OpenWork server is required to repair agent access to connected services.' because reconciling cloud MCP access can only be done through the server.
Source
Thrown at apps/app/src/react-app/domains/connections/store.ts:757
if (conflictsWithOpenworkConnect(entry)) {
const error = t("mcp.name_reserved_openwork_connect");
setStateField("mcpStatus", error);
finishPerf(options.developerMode(), "mcp.connect", "blocked", startedAt, {
reason: "openwork-connect-name-reserved",
});
return { ok: false, error };
}
try {
mutateState((current) => ({ ...current, mcpStatus: null, mcpConnectingName: entry.name }));
if (entry.managedBy === "openwork-connect") {
if (slug !== CLOUD_MCP_SERVER_NAME) {
throw new Error("OpenWork Connect MCP metadata is invalid.");
}
if (!canUseOpenworkServer || !openworkClient || !openworkWorkspaceId) {
throw new Error("OpenWork server is required to repair agent access to connected services.");
}
const context = await resolveCloudMcpOperationContext(entry.url);
if (!context) {
throw new Error("Sign in to OpenWork Cloud and choose an organization first.");
}
clearCloudMcpDisabledIntent(context);
const result = await runOpenworkCloudMcpReconciler({
mode: "repair",
client: openworkClient,
context: { ...context, trigger: "desktop-explicit-connect" },
mintToken: mintCloudControlMcpToken,
force: true,
refreshMarginMs: CLOUD_MCP_REFRESH_MARGIN_MS,
});
await refreshMcpServers();
if (result.health?.usable) {
setStateField("mcpStatus", t("mcp.connected"));
finishPerf(options.developerMode(), "mcp.connect", "done", startedAt, {View on GitHub (pinned to 2b7df46e8a)
Solutions
- Sign in to OpenWork Cloud so openworkWorkspaceId and the client are available
- Start/enable the local OpenWork server and confirm canUseOpenworkServer is true before repairing
- Ensure the store's openworkClient factory is wired (pass the client when constructing the connections store)
- Route the repair through a desktop session where the server integration is active
Example fix
// before
await connectionsStore.connect(entry);
// after
if (!(canUseOpenworkServer && openworkClient && openworkWorkspaceId)) {
await signInToOpenworkCloud(); // establishes client + workspace id
}
await connectionsStore.connect(entry); Defensive patterns
Strategy: validation
Validate before calling
const ready = canUseOpenworkServer && openworkClient != null && openworkWorkspaceId != null;
if (!ready) { promptSignInOrStartServer(); return; } Type guard
function canRepairCloudMcp(s: { canUseOpenworkServer: boolean; openworkClient: unknown; openworkWorkspaceId: string | null }): boolean {
return s.canUseOpenworkServer && s.openworkClient != null && s.openworkWorkspaceId != null;
} Try / catch
try {
await connectionsStore.connect(entry);
} catch (err) {
if (err.message.includes("OpenWork server is required")) {
await signInToOpenworkCloud();
await connectionsStore.connect(entry);
} else throw err;
} Prevention
- Verify server availability (canUseOpenworkServer) before offering repair actions
- Require OpenWork Cloud sign-in before showing managed-service repair UI
- Ensure openworkClient is passed when constructing the connections store
- Self-hosted setups: run the OpenWork server component, not just the desktop app
When it happens
Trigger: Attempting to connect/repair an openwork-connect managed MCP entry while signed out of OpenWork Cloud (no workspace id), with the server integration disabled (canUseOpenworkServer false), or with no openworkClient available.
Common situations: User not signed in to OpenWork Cloud tries to repair a connected service; self-hosted setup where the OpenWork server piece isn't running; web/workspace runtime without the desktop server client wired up.
Related errors
- Failed to sign in to OpenWork Cloud.
- invalid_mcp_token_payload
- invalid_mcp_connection_payload
- OpenWork server cannot read MCP config for this workspace.
- OpenWork Connect MCP metadata is invalid.
AI-assisted analysis of different-ai/openwork@2b7df46e8a (2026-09-01).
Data as JSON: /api/errors/982c77a4b9e4303e.
Report an issue: GitHub.