different-ai/openwork · error
Could not start ${action.connectionName} authorization.
Error message
Could not start ${action.connectionName} authorization. What it means
The Den MCP reconnect API response contained neither an already-completed connection nor an authorizeUrl. Without authorizeUrl there is no OAuth authorization endpoint to open in the desktop browser, so the flow aborts with the connection's name in the message.
Source
Thrown at apps/app/src/react-app/domains/session/surface/session-surface.tsx:2393
}
recordInspectorEvent("mcp.chat_reconnect.started", {
workspaceId: props.workspaceId,
sessionId: props.sessionId,
connectionId: action.connectionId,
});
onProgress({ phase: "opening" });
const result = await denClient.startMcpConnectionConnect(organizationId, action.connectionId);
if (result.status === "connected") {
recordInspectorEvent("mcp.chat_reconnect.completed", {
workspaceId: props.workspaceId,
sessionId: props.sessionId,
connectionId: action.connectionId,
completion: "already_connected",
});
return "connected";
}
if (!result.authorizeUrl) throw new Error(`Could not start ${action.connectionName} authorization.`);
await openDesktopUrl(result.authorizeUrl);
onProgress({ phase: "authorization_opened", authorizeUrl: result.authorizeUrl });
await waitForFreshMcpAuthorization({
connectionId: action.connectionId,
connectionName: action.connectionName,
previousConnectedAt: connection.connectedAt,
listConnections: () => denClient.listMcpConnections(organizationId, "usable"),
isScopeCurrent: () => isChatMcpReconnectScopeCurrent(scope, currentScope()),
});
recordInspectorEvent("mcp.chat_reconnect.completed", {
workspaceId: props.workspaceId,
sessionId: props.sessionId,
connectionId: action.connectionId,
completion: "fresh_authorization",
});
return "connected";
} catch (error) {View on GitHub (pinned to 2b7df46e8a)
Solutions
- Retry the reconnect; transient Den issues often resolve on a second attempt
- Inspect the Den API response/logs for the start-authorization call to see why authorizeUrl is absent
- Verify the connection's OAuth configuration (client id, authorize URL) in the Den console
- Check Den service status / network connectivity if it fails consistently
Defensive patterns
Strategy: retry
Validate before calling
const result = await startAuthorization(connectionId);
if (!result.alreadyConnected && !result.authorizeUrl) {
throw new RetryableError("Den returned no authorize URL");
} Try / catch
try {
await reconnect(action);
} catch (e) {
if (e instanceof Error && e.message.startsWith("Could not start")) {
toast.error(`${action.connectionName} authorization could not start. Check Den status and retry.`);
} else throw e;
} Prevention
- Retry the start-authorization call once or twice with backoff
- Monitor Den API health before offering reconnect
- Validate the connection's OAuth config server-side so authorizeUrl is always produced
- Surface the raw response to logs for debugging missing authorizeUrl
When it happens
Trigger: result.authorizeUrl is falsy in the Den client's start-authorization response — i.e. Den did not return an OAuth authorize URL for the connection (server-side start failed or the connection is not in an authorizable state).
Common situations: Den backend outage or partial failure returning a 2xx without an authorize URL; connection misconfigured server-side (missing OAuth client/authorize endpoint); connection in a state where re-auth is not permitted; network proxy stripping the response body.
Related errors
- Failed to start OAuth (${response.status}).
- OpenWork-managed MCP OAuth is currently available for local
- OpenWork-managed OAuth requires a remote MCP URL.
- Authorization for ${input.connectionName} did not finish. Co
- Google OAuth refresh did not return an access token.
AI-assisted analysis of different-ai/openwork@2b7df46e8a (2026-09-01).
Data as JSON: /api/errors/7dec73fb6a0d9b14.
Report an issue: GitHub.