continuedev/continue · error · Error

Failed to parse config: ${e.message}

Error message

Failed to parse config: ${e.message}

What it means

parseConfigYaml wraps YAML/parse failures: this branch fires when an error carries cause === 'result.success was false', i.e. the underlying parse pipeline reported failure and the original message is re-wrapped with the 'Failed to parse config' prefix.

Source

Thrown at packages/config-yaml/src/load/unroll.ts:49

export function parseConfigYaml(configYaml: string): ConfigYaml {
  try {
    const parsed = YAML.parse(configYaml);
    const result = configYamlSchema.safeParse(parsed);
    if (result.success) {
      return result.data;
    }

    throw new Error(formatZodError(result.error), {
      cause: "result.success was false",
    });
  } catch (e) {
    if (
      e instanceof Error &&
      "cause" in e &&
      e.cause === "result.success was false"
    ) {
      throw new Error(`Failed to parse config: ${e.message}`);
    } else if (e instanceof ZodError) {
      throw new Error(`Failed to parse config: ${formatZodError(e)}`);
    } else {
      throw new Error(
        `Failed to parse config: ${e instanceof Error ? e.message : e}`,
      );
    }
  }
}

export function parseAssistantUnrolled(configYaml: string): AssistantUnrolled {
  try {
    const parsed = YAML.parse(configYaml);
    const result = assistantUnrolledSchema.parse(parsed);
    return result;
  } catch (e: any) {
    console.error(
      `Failed to parse unrolled assistant: ${e.message}\n\n${configYaml}`,

View on GitHub (pinned to 5522c6f44c)

Solutions

  1. Read e.message embedded in the wrapped error for the root cause
  2. Validate the YAML syntactically (yamllint / YAML.parse alone) before calling parseConfigYaml
  3. Check the config against the expected schema version for your package version
Defensive patterns

Strategy: try-catch

Validate before calling

// Validate YAML syntax first
YAML.parse(configYaml); // throws raw YAML errors with better context

Try / catch

try {
  parseConfigYaml(yaml);
} catch (e) {
  if (e instanceof Error && e.message.startsWith('Failed to parse config')) {
    // surface e.message (contains the underlying cause)
  }
}

Prevention

When it happens

Trigger: Calling parseConfigYaml with a YAML string that the underlying parser rejects with a success:false result object (internal pipeline failure rather than a Zod schema mismatch).

Common situations: Malformed YAML (tabs, bad indentation), an unroll step failing, or a version mismatch producing unexpected intermediate structures.

Understand the failure class

Related errors


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