{"record":{"id":"9b24bea9f6a78deb","repo":"affaan-m/ECC","slug":"legacy-codex-sync-cannot-be-combined-with-targ","errorCode":null,"errorMessage":"--legacy-codex-sync cannot be combined with --target","messagePattern":"--legacy-codex-sync cannot be combined with --target","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/uninstall.js","lineNumber":98,"sourceCode":"    console.log(`  ${result.dryRun ? 'Planned removals' : 'Removed paths'}: ${paths.length}`);\n  }\n\n  console.log(`\\nSummary: checked=${result.summary.checkedCount}, ${result.dryRun ? 'planned' : 'uninstalled'}=${result.dryRun ? result.summary.plannedRemovalCount : result.summary.uninstalledCount}, partial=${result.summary.partialCount}, errors=${result.summary.errorCount}`);\n\n  if (!result.dryRun) {\n    console.log(`\\n${exitFeedbackLines().join('\\n')}`);\n  }\n}\n\nasync function main() {\n  try {\n    const options = parseArgs(process.argv);\n    if (options.help) {\n      showHelp(0);\n    }\n\n    if (options.legacyCodexSync && options.targets.length > 0) {\n      throw new Error('--legacy-codex-sync cannot be combined with --target');\n    }\n    const result = options.legacyCodexSync\n      ? uninstallLegacyCodexSync({\n          codexHome: process.env.CODEX_HOME,\n          dryRun: options.dryRun,\n        })\n      : uninstallInstalledStates({\n          homeDir: process.env.HOME || os.homedir(),\n          projectRoot: process.cwd(),\n          targets: options.targets,\n          dryRun: options.dryRun,\n        });\n    if (!options.dryRun && !options.legacyCodexSync) {\n      const { reconcileCanonicalInstallStates } = require('./lib/install-state-store-sync');\n      result.installStateProjection = await reconcileCanonicalInstallStates({\n        homeDir: process.env.HOME || os.homedir(),\n        projectRoot: process.cwd(),\n        targets: options.targets,","sourceCodeStart":80,"sourceCodeEnd":116,"githubUrl":"https://github.com/affaan-m/ECC/blob/06c5e118c4d3e6c3b7f9445f973a2194c82de193/scripts/uninstall.js#L80-L116","documentation":"Mutually exclusive paths in uninstall: --legacy-codex-sync performs the standalone legacy sync cleanup while --target removes specific targets; combining them is ambiguous and rejected before any file removal.","triggerScenarios":"Triggered when uninstall.js rejects the current invocation: --legacy-codex-sync cannot be combined with --target","commonSituations":"Occurs while running scripts/uninstall.js with invalid arguments, missing flags, or a failing external dependency; the guard at scripts/uninstall.js:98 aborts the command with this message.","solutions":["Pass only one of the conflicting options; remove the other(s) and re-run the command."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"06c5e118c4d3e6c3b7f9445f973a2194c82de193","analyzedAt":"2026-08-18T11:27:13.915Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}