{"record":{"id":"b643681acc91f685","repo":"plandex-ai/plandex","slug":"path-s-is-not-in-the-project","errorCode":null,"errorMessage":"path %s is not in the project","messagePattern":"path (.+?) is not in the project","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/cli/fs/paths.go","lineNumber":463,"sourceCode":"\treturn true, nil\n}\n\nfunc IsIgnored(paths *types.ProjectPaths, path, baseDir string) (bool, string, error) {\n\tif !paths.AllPaths[path] {\n\t\t// if the path isn't in AllPaths, it either:\n\t\t// 1. doesn't exist (in which case we shouldn't be calling this function)\n\t\t// 2. is a subpath of a git ignored dir\n\n\t\tfor dir := range paths.GitIgnoredDirs {\n\t\t\tsubpath, err := IsSubpathOf(dir, path, baseDir)\n\t\t\tif err != nil {\n\t\t\t\treturn false, \"\", fmt.Errorf(\"error checking if %s is a subpath of %s: %s\", path, dir, err)\n\t\t\t}\n\t\t\tif subpath {\n\t\t\t\treturn true, \"git\", nil\n\t\t\t}\n\t\t}\n\t\treturn false, \"\", fmt.Errorf(\"path %s is not in the project\", path)\n\t}\n\n\tif paths.ActivePaths[path] {\n\t\treturn false, \"\", nil\n\t}\n\n\tif paths.PlandexIgnored != nil && paths.PlandexIgnored.MatchesPath(path) {\n\t\treturn true, \"plandex\", nil\n\t}\n\n\treturn true, \"git\", nil\n}\n\nvar skipDirs = map[string]bool{\n\t\".git\":              true,\n\t\"node_modules\":      true,\n\t\"venv\":              true,\n\t\".cache\":            true,","sourceCodeStart":445,"sourceCodeEnd":481,"githubUrl":"https://github.com/plandex-ai/plandex/blob/e2d772072efadbe41d2946d97d79be55532dbab5/app/cli/fs/paths.go#L445-L481","documentation":"IsIgnored treats a path that is neither an active path nor inside any git-ignored directory as not belonging to the project, and errors with this message. It is a guard against loading context files that were never registered by path resolution.","triggerScenarios":"Calling MustLoadContext (or the anonymous caller) with a path that does not appear in paths.ActivePaths and is not a subpath of any GitIgnoredDirs entry — i.e. the path was never resolved in this project tree.","commonSituations":"Passing absolute paths outside the project root; referencing a file after moving it; loading paths from a different Plandex project or a stale current directory.","solutions":["Use a path relative to the project root that exists under it","Run the path through ParseInputPaths so it gets registered in ActivePaths before IsIgnored","cd to the project root before invoking the command","Check the path spelling/existence (ls the file)"],"exampleFix":"// before\nplandex load /tmp/notes.txt\n// after\ncd /path/to/project\nplandex load ./notes.txt","handlingStrategy":"validation","validationCode":"rel, err := filepath.Rel(projectRoot, absPath)\nif err != nil || strings.HasPrefix(rel, \"..\") {\n    return fmt.Errorf(\"%s is outside the project root\", path)\n}\nif _, err := os.Stat(absPath); err != nil {\n    return fmt.Errorf(\"%s does not exist: %w\", path, err)\n}","typeGuard":null,"tryCatchPattern":"ok, _, err := IsIgnored(path, paths, baseDir)\nif err != nil && strings.Contains(err.Error(), \"is not in the project\") {\n    return fmt.Errorf(\"re-run path resolution for %s before loading\", path)\n}","preventionTips":["cd to the project root before running Plandex commands","Always resolve files via ParseInputPaths rather than passing raw absolute paths","Re-resolve paths after moving/renaming files","Verify paths belong to the current project, not a sibling one"],"tags":["filesystem","paths","project-scope"],"backgroundTag":"path-outside-project-root","analyzedSha":"e2d772072efadbe41d2946d97d79be55532dbab5","analyzedAt":"2026-09-05T20:56:53.631Z","contentChangedAt":"2026-09-05T20:56:53.631Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}