continuedev/continue · error

Error parsing global context, deleting corrupted file: ${e}

Error message

Error parsing global context, deleting corrupted file: ${e}

What it means

Error "Error parsing global context, deleting corrupted file: ${e}" thrown in continuedev/continue.

Source

Thrown at core/util/GlobalContext.ts:131

      parsed[key] = value;
      fs.writeFileSync(filepath, JSON.stringify(parsed, null, 2));
    }
  }

  get<T extends keyof GlobalContextType>(
    key: T,
  ): GlobalContextType[T] | undefined {
    const filepath = getGlobalContextFilePath();
    if (!fs.existsSync(filepath)) {
      return undefined;
    }

    const data = fs.readFileSync(filepath, "utf-8");
    try {
      const parsed = JSON.parse(data);
      return parsed[key];
    } catch (e: any) {
      console.warn(
        `Error parsing global context, deleting corrupted file: ${e}`,
      );
      // Delete the corrupted file so it can be recreated fresh
      try {
        fs.unlinkSync(filepath);
      } catch (deleteError) {
        console.warn(
          `Error deleting corrupted global context file: ${deleteError}`,
        );
      }
      return undefined;
    }
  }

  getSharedConfig(): SharedConfigSchema {
    const sharedConfig = this.get("sharedConfig") ?? {};
    const result = sharedConfigSchema.safeParse(sharedConfig);
    if (result.success) {

View on GitHub (pinned to 5522c6f44c)

When it happens

Trigger: Thrown at core/util/GlobalContext.ts:131 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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