different-ai/openwork · error

${action.connectionName} is no longer available as your reco

Error message

${action.connectionName} is no longer available as your reconnectable account.

What it means

After fetching the org's usable MCP connections from Den, the code validates the requested connection still exists and is an OAuth connection with per-member credential mode. If the id is missing from the list or the authType/credentialMode don't match, the stored reconnect action is stale, so it throws with the connection's display name.

Source

Thrown at apps/app/src/react-app/domains/session/surface/session-surface.tsx:2374

    const scope: ChatMcpReconnectScope = {
      baseUrl: settings.baseUrl,
      token,
      organizationId,
    };
    const currentScope = (): ChatMcpReconnectScope => {
      const current = readDenSettings();
      return {
        baseUrl: current.baseUrl,
        token: current.authToken?.trim() ?? "",
        organizationId: current.activeOrgId?.trim() ?? "",
      };
    };
    try {
      const denClient = createDenClient({ baseUrl: settings.baseUrl, token });
      const connections = await denClient.listMcpConnections(organizationId, "usable");
      const connection = connections.find((entry) => entry.id === action.connectionId);
      if (!connection || connection.authType !== "oauth" || connection.credentialMode !== "per_member") {
        throw new Error(`${action.connectionName} is no longer available as your reconnectable account.`);
      }

      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";
      }

View on GitHub (pinned to 2b7df46e8a)

Solutions

  1. Refresh the connection list in the UI and re-surface only currently reconnectable (oauth + per_member) connections
  2. Check the connection's status/config in the OpenWork Cloud admin console and restore OAuth per-member credentials
  3. Clear stale reconnect actions and have the user initiate a fresh reconnect
  4. If the org changed, ensure the reconnect uses the currently active organization's connections
Defensive patterns

Strategy: validation

Validate before calling

const connections = await denClient.listMcpConnections(orgId, "usable");
const stillValid = connections.some(
  (c) => c.id === action.connectionId && c.authType === "oauth" && c.credentialMode === "per_member"
);
if (!stillValid) refreshConnectionActions();

Type guard

const isReconnectable = (c: McpConnection): c is McpConnection & { authType: "oauth"; credentialMode: "per_member" } =>
  c.authType === "oauth" && c.credentialMode === "per_member";

Try / catch

try {
  await reconnect(action);
} catch (e) {
  if (e instanceof Error && e.message.includes("no longer available")) {
    await refreshConnections();
    toast.info(`${action.connectionName} must be re-added before reconnecting.`);
  } else throw e;
}

Prevention

When it happens

Trigger: Reconnect action references action.connectionId that no longer appears in denClient.listMcpConnections(organizationId, "usable"), or the connection's authType is not "oauth" or credentialMode is not "per_member".

Common situations: Admin removed or disabled the connection in Den; connection changed from per-member OAuth to shared credentials; stale UI state after org switch; connection renamed/rotated server-side between when the action was surfaced and clicked.

Related errors


AI-assisted analysis of different-ai/openwork@2b7df46e8a (2026-09-01). Data as JSON: /api/errors/f06ae4119d5d13a6. Report an issue: GitHub.