{"record":{"id":"73f2d3575846d1d8","repo":"plandex-ai/plandex","slug":"failed-to-check-context-conflicts-v","errorCode":null,"errorMessage":"failed to check context conflicts: %v","messagePattern":"failed to check context conflicts: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/cli/lib/context_load.go","lineNumber":675,"sourceCode":"\t\t\t\tInputSizes:  pathSizes,\n\t\t\t\tFilePath:    inputPath,\n\t\t\t\tAutoLoaded:  params.AutoLoaded,\n\t\t\t})\n\n\t\t}\n\t}\n\n\tfilesToLoad := map[string]string{}\n\tfor _, context := range loadContextReq {\n\t\tif context.ContextType == shared.ContextFileType {\n\t\t\tfilesToLoad[context.FilePath] = context.Body\n\t\t}\n\t}\n\n\thasConflicts, err := checkContextConflicts(filesToLoad)\n\n\tif err != nil {\n\t\tonErr(fmt.Errorf(\"failed to check context conflicts: %v\", err))\n\t}\n\n\tif len(loadContextReq)+len(cachedMapPaths) == 0 {\n\t\tterm.StopSpinner()\n\t\tfmt.Println(\"🤷‍♂️ No context loaded\")\n\n\t\tdidOutputReason := false\n\t\tif len(alreadyLoadedByComposite) > 0 {\n\t\t\tprintAlreadyLoadedMsg(alreadyLoadedByComposite)\n\t\t\tdidOutputReason = true\n\t\t}\n\t\tif len(ignoredPaths) > 0 && !params.SkipIgnoreWarning {\n\t\t\tprintIgnoredMsg()\n\t\t\tdidOutputReason = true\n\t\t}\n\n\t\tif !didOutputReason {\n\t\t\tfmt.Println()","sourceCodeStart":657,"sourceCodeEnd":693,"githubUrl":"https://github.com/plandex-ai/plandex/blob/e2d772072efadbe41d2946d97d79be55532dbab5/app/cli/lib/context_load.go#L657-L693","documentation":"MustLoadContext wraps any error returned by checkContextConflicts with this message before invoking the onErr handler. It indicates the pre-flight check that detects conflicting context entries (e.g. overlapping or mutually exclusive file/directory loads) itself failed, so conflict status is unknown. The load is not aborted by this wrapper alone; the underlying error is the cause.","triggerScenarios":"Calling contextLoad, new, or MustLoadAutoContextMap while checkContextConflicts(filesToLoad) returns an error — typically filesystem/stat failures while examining the resolved file list, or malformed entries in filesToLoad.","commonSituations":"Files deleted or permission-denied between resolution and conflict check; symlinks to unreadable locations; a context file path that no longer exists on disk.","solutions":["Read the wrapped %v cause to identify which file/stat operation failed","Re-run the context load after verifying all resolved paths exist and are readable (ls/permissions)","Remove stale context entries (plandex context clear or unload the missing files) and reload"],"exampleFix":"// before\nhasConflicts, err := checkContextConflicts(filesToLoad)\nif err != nil {\n    onErr(fmt.Errorf(\"failed to check context conflicts: %v\", err))\n}\n// after — skip the check when nothing to compare or log and continue\nhasConflicts, err := checkContextConflicts(filesToLoad)\nif err != nil && len(filesToLoad) > 0 {\n    onErr(fmt.Errorf(\"failed to check context conflicts: %v\", err))\n}","handlingStrategy":"fallback","validationCode":"for _, f := range filesToLoad {\n    if _, err := os.Stat(f); err != nil {\n        return fmt.Errorf(\"context file %s is not accessible: %w\", f, err)\n    }\n}","typeGuard":null,"tryCatchPattern":"hasConflicts, err := checkContextConflicts(filesToLoad)\nif err != nil {\n    // degrade gracefully: assume no conflicts and surface a warning\n    fmt.Printf(\"warning: conflict check skipped: %v\\n\", err)\n    hasConflicts = false\n}","preventionTips":["Ensure all context paths exist and are readable before loading","Clean stale context entries regularly (context clear / unload)","Run the CLI from a stable working directory without broken symlinks"],"tags":["context","filesystem","cli"],"backgroundTag":"context-conflict-check-failed","analyzedSha":"e2d772072efadbe41d2946d97d79be55532dbab5","analyzedAt":"2026-09-05T20:56:53.631Z","contentChangedAt":"2026-09-05T20:56:53.631Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}