continuedev/continue · error · Error

Failed to sync remote config (HTTP ${response.status}): ${re

Error message

Failed to sync remote config (HTTP ${response.status}): ${response.statusText}

What it means

The client stub for syncing remote config GETs the config endpoint with a Bearer userToken; on a non-OK response it throws with status and statusText. Auth failures (401), missing configs (404), or hub errors (5xx) all surface here.

Source

Thrown at core/continueServer/stubs/client.ts:42

  getUserToken(): string | undefined {
    return this.userToken;
  }

  get connected(): boolean {
    return this.url !== undefined && this.userToken !== undefined;
  }

  public async getConfig(): Promise<{ configJson: string }> {
    const userToken = await this.userToken;
    const response = await fetch(new URL("sync", this.url).href, {
      method: "GET",
      headers: {
        Authorization: `Bearer ${userToken}`,
      },
    });
    if (!response.ok) {
      throw new Error(
        `Failed to sync remote config (HTTP ${response.status}): ${response.statusText}`,
      );
    }
    const data = await response.json();
    return data;
  }

  public async getFromIndexCache<T extends ArtifactType>(
    keys: string[],
    artifactId: T,
    repoName: string | undefined,
  ): Promise<EmbeddingsCacheResponse<T>> {
    if (repoName === undefined) {
      console.warn(
        "No repo name provided to getFromIndexCache, this may cause no results to be returned.",
      );
    }

View on GitHub (pinned to 5522c6f44c)

Solutions

  1. Verify the token: decode the JWT and check exp; re-authenticate to get a fresh userToken
  2. Confirm the config id/URL points at the correct hub environment
  3. Retry on 5xx; check hub status if failures persist
Defensive patterns

Strategy: retry

Validate before calling

function isLikelyValidToken(t: string): boolean {
  try { const { exp } = JSON.parse(Buffer.from(t.split('.')[1], 'base64').toString()); return Date.now() / 1000 < exp; }
  catch { return false; }
}

Try / catch

try { return await getConfig(userToken); }
catch (e) {
  if (/HTTP 401/.test(e.message)) { userToken = await reauthenticate(); return getConfig(userToken); }
  if (/HTTP 5\d\d/.test(e.message)) { await backoff(); return getConfig(userToken); }
  throw e;
}

Prevention

When it happens

Trigger: Calling getConfig with an invalid/expired userToken (401), a user/config id that no longer exists on the hub (404), or hub downtime (5xx).

Common situations: Stale token after re-login, token from a different environment (dev vs prod hub), config deleted on the hub side, or hub migration changing endpoints.

Related errors


AI-assisted analysis of continuedev/continue@5522c6f44c (2026-08-27). Data as JSON: /api/errors/1ef4fc487b3fe50c. Report an issue: GitHub.