{"record":{"id":"7dec73fb6a0d9b14","repo":"different-ai/openwork","slug":"could-not-start-action-connectionname-authoriza","errorCode":null,"errorMessage":"Could not start ${action.connectionName} authorization.","messagePattern":"Could not start (.+?) authorization\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"apps/app/src/react-app/domains/session/surface/session-surface.tsx","lineNumber":2393,"sourceCode":"      }\n\n      recordInspectorEvent(\"mcp.chat_reconnect.started\", {\n        workspaceId: props.workspaceId,\n        sessionId: props.sessionId,\n        connectionId: action.connectionId,\n      });\n      onProgress({ phase: \"opening\" });\n      const result = await denClient.startMcpConnectionConnect(organizationId, action.connectionId);\n      if (result.status === \"connected\") {\n        recordInspectorEvent(\"mcp.chat_reconnect.completed\", {\n          workspaceId: props.workspaceId,\n          sessionId: props.sessionId,\n          connectionId: action.connectionId,\n          completion: \"already_connected\",\n        });\n        return \"connected\";\n      }\n      if (!result.authorizeUrl) throw new Error(`Could not start ${action.connectionName} authorization.`);\n\n      await openDesktopUrl(result.authorizeUrl);\n      onProgress({ phase: \"authorization_opened\", authorizeUrl: result.authorizeUrl });\n      await waitForFreshMcpAuthorization({\n        connectionId: action.connectionId,\n        connectionName: action.connectionName,\n        previousConnectedAt: connection.connectedAt,\n        listConnections: () => denClient.listMcpConnections(organizationId, \"usable\"),\n        isScopeCurrent: () => isChatMcpReconnectScopeCurrent(scope, currentScope()),\n      });\n      recordInspectorEvent(\"mcp.chat_reconnect.completed\", {\n        workspaceId: props.workspaceId,\n        sessionId: props.sessionId,\n        connectionId: action.connectionId,\n        completion: \"fresh_authorization\",\n      });\n      return \"connected\";\n    } catch (error) {","sourceCodeStart":2375,"sourceCodeEnd":2411,"githubUrl":"https://github.com/different-ai/openwork/blob/2b7df46e8ae1517d64c896c7793d2d52ec845669/apps/app/src/react-app/domains/session/surface/session-surface.tsx#L2375-L2411","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","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"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"const result = await startAuthorization(connectionId);\nif (!result.alreadyConnected && !result.authorizeUrl) {\n  throw new RetryableError(\"Den returned no authorize URL\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  await reconnect(action);\n} catch (e) {\n  if (e instanceof Error && e.message.startsWith(\"Could not start\")) {\n    toast.error(`${action.connectionName} authorization could not start. Check Den status and retry.`);\n  } else throw e;\n}","preventionTips":["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"],"tags":["oauth","mcp","network"],"backgroundTag":"missing-authorize-url","analyzedSha":"2b7df46e8ae1517d64c896c7793d2d52ec845669","analyzedAt":"2026-09-01T07:59:23.713Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}