plandex-ai/plandex · error

error getting parent project ids with paths: %v

Error message

error getting parent project ids with paths: %v

What it means

This error wraps a failure from fs.GetParentProjectIdsWithPaths(auth.Current.UserId), which enumerates parent projects (with filesystem paths) for the current user. The call runs in a goroutine during the 'plans' command; any filesystem or lookup error is reported with this message.

Source

Thrown at app/cli/cmd/plans.go:65

	if archivedOnly {
		listArchived()
	} else {
		listActive()
	}
}

func listActive() {
	errCh := make(chan error)

	var parentProjectIdsWithPaths [][2]string
	var childProjectIdsWithPaths [][2]string

	go func() {
		res, err := fs.GetParentProjectIdsWithPaths(auth.Current.UserId)

		if err != nil {
			errCh <- fmt.Errorf("error getting parent project ids with paths: %v", err)
			return
		}

		parentProjectIdsWithPaths = res
		errCh <- nil
	}()

	go func() {
		ctx, cancel := context.WithTimeout(context.Background(), 500*time.Millisecond)
		defer cancel()

		res, err := fs.GetChildProjectIdsWithPaths(ctx, auth.Current.UserId)

		if err != nil {
			log.Println(err.Error())

			if err.Error() == "context timeout" {
				errCh <- nil

View on GitHub (pinned to e2d772072e)

Solutions

  1. Verify project directories exist and are readable by the current user
  2. Check filesystem permissions on the data/projects directory
  3. Re-authenticate so auth.Current.UserId is correct
  4. Rebuild/repair project state if the index is stale

Example fix

// before
res, err := fs.GetParentProjectIdsWithPaths(auth.Current.UserId)
if err != nil {
    errCh <- fmt.Errorf("error getting parent project ids with paths: %v", err)
    return
}
// after
res, err := fs.GetParentProjectIdsWithPaths(auth.Current.UserId)
if err != nil {
    if os.IsPermission(err) {
        errCh <- fmt.Errorf("permission denied reading project directories: %v", err)
    } else {
        errCh <- fmt.Errorf("error getting parent project ids with paths: %v", err)
    }
    return
}
Defensive patterns

Strategy: fallback

Validate before calling

if auth.Current.UserId == "" {
    return fmt.Errorf("not authenticated")
}
if fi, err := os.Stat(projectsDir); err != nil || !fi.IsDir() {
    return fmt.Errorf("projects directory missing or unreadable: %s", projectsDir)
}

Try / catch

res, err := fs.GetParentProjectIdsWithPaths(auth.Current.UserId)
if err != nil {
    log.Warnf("parent projects unavailable: %v", err)
    res = nil // degrade gracefully
}

Prevention

When it happens

Trigger: GetParentProjectIdsWithPaths returns an error — e.g. the projects directory is unreadable, paths were moved/deleted, or user identity lookup fails.

Common situations: Project directories deleted or renamed outside the CLI, permission issues on the data directory, corrupted project index/state files.

Related errors


AI-assisted analysis of plandex-ai/plandex@e2d772072e (2026-09-05). Data as JSON: /api/errors/0672882b6a93c14e. Report an issue: GitHub.