tinyhumansai/openhuman · error

mcp.detail.reconfigureReconnectFailed

Error message

mcp.detail.reconfigureReconnectFailed

What it means

After updateEnv the client reconnects; a resulting 'unauthorized' status normally maps to an actionable auth hint via authHintMessageKey (use Sign in / token rejected / credential required), but when auth_hint is absent or unrecognized the generic reconfigureReconnectFailed message is shown — the raw 401 body is deliberately withheld server-side (#4289).

Source

Thrown at app/src/components/channels/mcp/InstalledServerDetail.tsx:213

      // have a value or the server loses required env on reconnect. Mirror the
      // install dialog's validation.
      for (const key of visibleEnvKeys) {
        if (!reconfigValues[key]?.trim()) {
          throw new Error(t('mcp.install.missingRequired').replace('{key}', key));
        }
      }
      log('reconfigure save server_id=%s', server.server_id);
      const result = await mcpClientsApi.updateEnv({
        server_id: server.server_id,
        env: reconfigValues,
      });
      setTools(result.tools ?? []);
      if (result.status === 'unauthorized') {
        // A 401 after reconfigure: show the actionable auth reason (use Sign in
        // / token rejected / credential required) the same way the Connect
        // dialog does — the raw 401 message is withheld server-side (#4289).
        const key = authHintMessageKey(result.auth_hint);
        throw new Error(key ? t(key) : t('mcp.detail.reconfigureReconnectFailed'));
      }
      if (result.status !== 'connected') {
        throw new Error(result.error ?? t('mcp.detail.reconfigureReconnectFailed'));
      }
      setReconfigDone(true);
      setReconfigOpen(false);
    });
  }, [server.env_keys, server.server_id, reconfigValues, runBusy, t]);

  return (
    <div className="space-y-4">
      {/* Header */}
      <div className="flex items-start gap-3">
        {server.icon_url ? (
          <img
            src={server.icon_url}
            alt=""
            className="w-10 h-10 rounded shrink-0 object-contain bg-surface border border-line-subtle"

View on GitHub (pinned to a221052e0d)

Solutions

  1. Open the Connect dialog for that server and re-authenticate from scratch
  2. Re-enter the credential in reconfigure, making sure it is a fresh, valid token/key
  3. If it persists, disconnect and reinstall the server, then connect again
Defensive patterns

Strategy: try-catch

Validate before calling

// Before saving, pre-validate that credentials look present and fresh:
const required = visibleEnvKeys.filter(k => /token|key|secret/i.test(k));
const stale = required.filter(k => !reconfigValues[k]?.trim());
if (stale.length) { /* block save and prompt re-entry */ }

Type guard

const hasAuthHint = (h: unknown): h is string => typeof h === 'string' && h.length > 0;

Try / catch

try {
  const result = await mcpClientsApi.updateEnv({ server_id, env });
  if (result.status === 'unauthorized' && !result.auth_hint) {
    // fall back to the Connect dialog flow instead of looping on reconfigure
    openConnectDialog();
    return;
  }
} catch (e) { /* surface, then guide user to re-auth */ }

Prevention

When it happens

Trigger: Env update succeeded but reconnect got a 401 with auth_hint null or an uncategorized value: token expired between operations, credential rejected without a classified reason.

Common situations: API key rotated or expired mid-session; server changed its auth scheme so the hint classifier misses it.

Related errors


AI-assisted analysis of tinyhumansai/openhuman@a221052e0d (2026-08-16). Data as JSON: /api/errors/961f3dd6f1c42adf. Report an issue: GitHub.