{"record":{"id":"bb8245dd48434619","repo":"plandex-ai/plandex","slug":"error-getting-child-project-ids-with-paths-v","errorCode":null,"errorMessage":"error getting child project ids with paths: %v","messagePattern":"error getting child project ids with paths: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/cli/cmd/plans.go","lineNumber":87,"sourceCode":"\t\tparentProjectIdsWithPaths = res\n\t\terrCh <- nil\n\t}()\n\n\tgo func() {\n\t\tctx, cancel := context.WithTimeout(context.Background(), 500*time.Millisecond)\n\t\tdefer cancel()\n\n\t\tres, err := fs.GetChildProjectIdsWithPaths(ctx, auth.Current.UserId)\n\n\t\tif err != nil {\n\t\t\tlog.Println(err.Error())\n\n\t\t\tif err.Error() == \"context timeout\" {\n\t\t\t\terrCh <- nil\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\terrCh <- fmt.Errorf(\"error getting child project ids with paths: %v\", err)\n\t\t\treturn\n\t\t}\n\n\t\tchildProjectIdsWithPaths = res\n\t\terrCh <- nil\n\t}()\n\n\tfor i := 0; i < 2; i++ {\n\t\terr := <-errCh\n\t\tif err != nil {\n\t\t\tterm.OutputErrorAndExit(\"%v\", err)\n\t\t}\n\t}\n\n\tvar projectIds []string\n\n\tif lib.CurrentProjectId != \"\" {\n\t\tprojectIds = append(projectIds, lib.CurrentProjectId)","sourceCodeStart":69,"sourceCodeEnd":105,"githubUrl":"https://github.com/plandex-ai/plandex/blob/e2d772072efadbe41d2946d97d79be55532dbab5/app/cli/cmd/plans.go#L69-L105","documentation":"This error wraps a failure from fetching child project ids with paths during the 'plans' command. Notably, a 'context timeout' error is deliberately treated as success (errCh <- nil), so this error only fires for non-timeout failures in the child-project lookup goroutine.","triggerScenarios":"The child-project lookup returns an error other than 'context timeout' — e.g. filesystem read failure, permissions, or corrupted project state.","commonSituations":"Child project directories removed or moved on disk, permission errors on the data directory, I/O errors on slow or full disks.","solutions":["Verify child project directories exist and are accessible","Check filesystem permissions and disk health/space","Re-authenticate if user identity is stale","Retry the command; if only timeouts were occurring, the command already succeeds silently"],"exampleFix":"// before\nif err.Error() == \"context timeout\" {\n    errCh <- nil\n    return\n}\nerrCh <- fmt.Errorf(\"error getting child project ids with paths: %v\", err)\n// after\nif errors.Is(err, context.DeadlineExceeded) || err.Error() == \"context timeout\" {\n    errCh <- nil\n    return\n}\nerrCh <- fmt.Errorf(\"error getting child project ids with paths: %w\", err)","handlingStrategy":"fallback","validationCode":"if fi, err := os.Stat(projectsDir); err != nil || !fi.IsDir() {\n    return fmt.Errorf(\"projects directory missing or unreadable\")\n}","typeGuard":null,"tryCatchPattern":"res, err := getChildProjectIdsWithPaths(ctx)\nif err != nil {\n    if errors.Is(err, context.DeadlineExceeded) {\n        return nil, nil // treat as empty\n    }\n    return nil, err\n}","preventionTips":["Set a generous context timeout for directory scans","Preserve project directories referenced by state","Check disk health and permissions","Use errors.Is(err, context.DeadlineExceeded) instead of string compare"],"tags":["filesystem","cli","projects"],"backgroundTag":"filesystem-read-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"}