{"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":"Warning from readProjectConfig: the 'githubCopilot' field failed its shape check (not a plain object), or nested 'githubCopilot.cloudAgent' is not a boolean. The invalid preference is ignored — cloudAgent defaults apply — and a warning identifies the exact field so the user can fix config.yaml.","triggerScenarios":"Thrown at src/core/project-config.ts:393 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Write 'githubCopilot' as a mapping with a cloudAgent boolean","Remove the field if no Copilot preferences are needed"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6926ccb18afa4ff621112813e9968334576ee11a","analyzedAt":"2026-08-25T12:29:45.729Z","contentChangedAt":"2026-08-25T12:29:45.729Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}