{"record":{"id":"f46f8f90e2e28c65","repo":"Fission-AI/OpenSpec","slug":"invalid-githubcopilot-field-in-config-must-be-o","errorCode":null,"errorMessage":"Invalid 'githubCopilot' field in config (must be object)","messagePattern":"Invalid 'githubCopilot' field in config \\(must be object\\)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/core/project-config.ts","lineNumber":393,"sourceCode":"        );\n      }\n    }\n\n    // Parse githubCopilot preferences (only cloudAgent is recognized today).\n    if (raw.githubCopilot !== undefined) {\n      if (\n        typeof raw.githubCopilot === 'object' &&\n        raw.githubCopilot !== null &&\n        !Array.isArray(raw.githubCopilot)\n      ) {\n        const cloudAgent = (raw.githubCopilot as Record<string, unknown>).cloudAgent;\n        if (typeof cloudAgent === 'boolean') {\n          config.githubCopilot = { cloudAgent };\n        } else if (cloudAgent !== undefined) {\n          console.warn(`Invalid 'githubCopilot.cloudAgent' field in config (must be a boolean)`);\n        }\n      } else {\n        console.warn(`Invalid 'githubCopilot' field in config (must be an object)`);\n      }\n    }\n\n    // Return partial config even if some fields failed\n    return Object.keys(config).length > 0 ? (config as ProjectConfig) : null;\n  } catch (error) {\n    console.warn(\n      `Warning: could not parse ${configPathForWarnings(projectRoot)} (${error instanceof Error ? error.message.split('\\n')[0] : String(error)}); ignoring it.`\n    );\n    return null;\n  }\n}\n\nfunction configPathForWarnings(projectRoot: string): string {\n  return resolveConfigFilePath(projectRoot) ?? path.join(projectRoot, 'openspec', 'config.yaml');\n}\n\n/**","sourceCodeStart":375,"sourceCodeEnd":411,"githubUrl":"https://github.com/Fission-AI/OpenSpec/blob/6926ccb18afa4ff621112813e9968334576ee11a/src/core/project-config.ts#L375-L411","documentation":"Error \"Invalid 'githubCopilot' field in config (must be object)\" thrown in Fission-AI/OpenSpec.","triggerScenarios":"Thrown at src/core/project-config.ts:393 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6926ccb18afa4ff621112813e9968334576ee11a","analyzedAt":"2026-08-25T12:29:45.729Z","schemaVersion":2},"datasetVersion":"2026-08-25T16:17:27.014Z"}