{"record":{"id":"1c5cf46c4ba0acec","repo":"continuedev/continue","slug":"failed-to-load-config","errorCode":null,"errorMessage":"Failed to load config","messagePattern":"Failed to load config","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"core/core.ts","lineNumber":743,"sourceCode":"\n    on(\"nextEdit/queue/clear\", async (msg) => {\n      console.log(\"nextEdit/queue/clear\");\n      const queue = PrefetchQueue.getInstance();\n      queue.clear();\n      return;\n    });\n\n    on(\"nextEdit/queue/abort\", async (msg) => {\n      console.log(\"nextEdit/queue/abort\");\n      const queue = PrefetchQueue.getInstance();\n      queue.abort();\n      return;\n    });\n\n    on(\"streamDiffLines\", async (msg) => {\n      const { config } = await this.configHandler.loadConfig();\n      if (!config) {\n        throw new Error(\"Failed to load config\");\n      }\n\n      const { data } = msg;\n\n      // Title can be an edit, chat, or apply model\n      // Fall back to chat\n      const llm =\n        config.modelsByRole.edit.find((m) => m.title === data.modelTitle) ??\n        config.modelsByRole.apply.find((m) => m.title === data.modelTitle) ??\n        config.modelsByRole.chat.find((m) => m.title === data.modelTitle) ??\n        config.selectedModelByRole.chat;\n\n      if (!llm) {\n        throw new Error(\"No model selected\");\n      }\n\n      const abortManager = ApplyAbortManager.getInstance();\n      const abortController = abortManager.get(","sourceCodeStart":725,"sourceCodeEnd":761,"githubUrl":"https://github.com/continuedev/continue/blob/5522c6f44ca0ac3528b37244818fbfa39b5af470/core/core.ts#L725-L761","documentation":"The streamDiffLines handler loads config to resolve a model for streaming a diff; if loadConfig returns no config object (parse failure, missing file, or error swallowed into undefined) it throws 'Failed to load config'.","triggerScenarios":"Requesting streamDiffLines when config.json is missing, unparsable, or loadConfig returned an error result with config undefined.","commonSituations":"Corrupted or hand-edited config.json; deleted config directory; schema change after upgrade invalidating old config.","solutions":["Fix or regenerate config.json (check JSON syntax)","Check that loadConfig errors are surfaced, not silently returning undefined","Restore a known-good config backup"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const { config, error } = await configHandler.loadConfig();\nif (!config) { surface(error ?? 'config.json missing/invalid'); return; }","typeGuard":"const isConfig = (c: unknown): c is Config => !!c && typeof c === 'object' && 'modelsByRole' in c;","tryCatchPattern":"catch (e) { if (e.message === 'Failed to load config') { revalidateConfigFile(); } }","preventionTips":["Validate config.json (JSON.parse + schema) at startup","Back up config before migrations"],"tags":["config","ipc","diff-streaming"],"backgroundTag":"config-load-failed","analyzedSha":"5522c6f44ca0ac3528b37244818fbfa39b5af470","analyzedAt":"2026-08-27T11:28:54.683Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}