tinyhumansai/openhuman · error

[core-state] memory client sync failed after session store:

Error message

[core-state] memory client sync failed after session store:

What it means

Syncing the memory client's auth token failed right after storing a session token in storeSessionToken: syncMemoryClientToken rejected for the newly issued token. The session itself is stored (storeSession already completed), but memory operations will not carry the new token — memory auth failures surface later until a refresh-cycle sync (which retries via the refresh path) succeeds.

Source

Thrown at app/src/providers/CoreStateProvider.tsx:708

      // un-caught `app_state_snapshot` timeout used to bubble out of
      // `setEncryptionKey` / `setOnboardingTasks` callers as an unhandled
      // rejection → OPENHUMAN-REACT-Z/Y. The next poll tick will reconcile.
      await refresh().catch(err => {
        log('refresh failed after updateLocalState: %O', sanitizeError(err));
      });
    },
    [refresh]
  );

  const storeSessionToken = useCallback(
    async (token: string, user?: object) => {
      logoutGuardUntilRef.current = 0;
      await storeSession(token, user ?? {});
      try {
        await syncMemoryClientToken(token);
        memoryTokenRef.current = token;
      } catch (error) {
        console.warn('[core-state] memory client sync failed after session store:', error);
      }
      // refresh() drives refreshCore, which now owns identity-flip detection
      // and dispatches handleIdentityFlip when both prev and next are
      // authenticated and identities differ. The previous standalone
      // restartApp call here was redundant and skipped the persist purge,
      // letting redux-persist rehydrate the prior user's slices on launch
      // (#900). Restart now happens inside handleIdentityFlip after purge.
      // Swallow refresh failures here so a cold-boot `app_state_snapshot`
      // timeout post-login doesn't surface as an unhandled rejection
      // (OPENHUMAN-REACT-Z/Y) — the polling loop reconciles within
      // `POLL_MS`.
      await refresh().catch(err => {
        log('refresh failed after session store: %O', sanitizeError(err));
      });
      if (!isLocalSessionToken(token)) {
        await refreshTeams().catch(err => {
          log('refreshTeams failed after session store: %O', sanitizeError(err));
        });

View on GitHub (pinned to 7491200858)

Solutions

  1. Check the warned error to identify the memory client sync failure layer
  2. Sign out and back in to force a fresh token and a new sync attempt
  3. Watch for memory feature errors in-session; the periodic refresh retries the token sync on its own
  4. Persistent failures: inspect core memory service logs
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at app/src/providers/CoreStateProvider.tsx:708 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17). Data as JSON: /api/errors/028af2e54dd16884. Report an issue: GitHub.