{"record":{"id":"03d81c7f4aa84541","repo":"thedotmack/claude-mem","slug":"override-file-overrideid-not-found-using-par","errorCode":null,"errorMessage":"Override file '${overrideId}' not found, using parent mode '${parentId}' only","messagePattern":"Override file '(.+?)' not found, using parent mode '(.+?)' only","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/services/domain/ModeManager.ts","lineNumber":148,"sourceCode":"    let parentMode: ModeConfig;\n    try {\n      parentMode = this.loadMode(parentId);\n    } catch (error) {\n      if (error instanceof Error) {\n        logger.warn('WORKER', `Parent mode '${parentId}' not found for ${modeId}, falling back to 'code'`, { message: error.message });\n      } else {\n        logger.warn('WORKER', `Parent mode '${parentId}' not found for ${modeId}, falling back to 'code'`, { error: String(error) });\n      }\n      parentMode = this.loadMode('code');\n    }\n\n    let overrideConfig: Partial<ModeConfig>;\n    try {\n      overrideConfig = this.loadModeFile(overrideId);\n      logger.debug('SYSTEM', `Loaded override file: ${overrideId} for parent ${parentId}`);\n    } catch (error) {\n      if (error instanceof Error) {\n        logger.warn('WORKER', `Override file '${overrideId}' not found, using parent mode '${parentId}' only`, { message: error.message });\n      } else {\n        logger.warn('WORKER', `Override file '${overrideId}' not found, using parent mode '${parentId}' only`, { error: String(error) });\n      }\n      this.activeMode = parentMode;\n      return parentMode;\n    }\n\n    if (!overrideConfig) {\n      logger.warn('SYSTEM', `Invalid override file: ${overrideId}, using parent mode '${parentId}' only`);\n      this.activeMode = parentMode;\n      return parentMode;\n    }\n\n    const mergedMode = this.deepMerge(parentMode, overrideConfig);\n    this.activeMode = mergedMode;\n    this.activeModeId = modeId;\n\n    logger.debug('SYSTEM', `Loaded mode with inheritance: ${mergedMode.name} (${modeId} = ${parentId} + ${overrideId})`, undefined, {","sourceCodeStart":130,"sourceCodeEnd":166,"githubUrl":"https://github.com/thedotmack/claude-mem/blob/e2d1df569a8f04075d40e92461128ece7cf04c82/src/services/domain/ModeManager.ts#L130-L166","documentation":"After the parent mode loads, ModeManager reads the override fragment with loadModeFile(overrideId). This warning (Error branch) fires when that call throws — override file missing, unreadable, or invalid JSON — and the manager returns the parent mode unchanged, dropping all override customizations. The active mode is the plain parent, so behavior differs from what the mode author intended.","triggerScenarios":"A mode declaring inheritance.overrideId whose override file is absent from the modes directory, has a filename/extension mismatch, contains JSON that fails parsing, or is unreadable (EACCES).","commonSituations":"Renaming or deleting an override fragment without updating the child mode; shipping a mode that references an override file never packaged; sync tools (OneDrive/Dropbox) leaving placeholder files that fail to read; wrong file extension.","solutions":["Verify inheritance.overrideId in the mode config resolves to an existing, readable override file.","Recreate or restore the override file with valid JSON and the expected naming.","If overrides are no longer wanted, remove the inheritance block so the mode is standalone and the warning stops.","Inspect error.message in the log entry to distinguish ENOENT (missing file) from a parse error (malformed content)."],"exampleFix":"// before: inheritance references a file that does not exist\n{ \"inheritance\": { \"parentId\": \"code\", \"overrideId\": \"my-overide\" } }\n// after: overrideId matches the actual file my-override.json\n{ \"inheritance\": { \"parentId\": \"code\", \"overrideId\": \"my-override\" } }","handlingStrategy":"validation","validationCode":"// confirm the override file exists and parses before activating the mode\nconst { overrideId } = cfg.inheritance;\nconst p = modeFilePath(overrideId);\nif (!existsSync(p)) throw new Error(`override file missing: ${p}`);\nJSON.parse(readFileSync(p, 'utf-8')); // throws early with a clear cause\nmodeManager.setMode(modeId);","typeGuard":null,"tryCatchPattern":"try {\n  modeManager.setMode(modeId);\n} catch (e) {\n  // fallback value is intentional: verify the active mode afterwards\n  const active = modeManager.getActiveMode();\n  if (active.id !== modeId) log.warn('mode fell back', { modeId, active: active.id });\n}","preventionTips":["Name override files exactly as the overrideId string plus the expected extension.","Include override files in the same package/repo as the modes that reference them.","Avoid cloud-sync placeholders in the modes directory."],"tags":["mode-config","override","inheritance","fallback"],"backgroundTag":"config-reference-not-found","analyzedSha":"e2d1df569a8f04075d40e92461128ece7cf04c82","analyzedAt":"2026-08-20T23:58:13.836Z","contentChangedAt":"2026-08-20T23:58:13.836Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}