plandex-ai/plandex · error

error getting child project ids with paths: %v

Error message

error getting child project ids with paths: %v

What it means

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.

Source

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

		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
				return
			}

			errCh <- fmt.Errorf("error getting child project ids with paths: %v", err)
			return
		}

		childProjectIdsWithPaths = res
		errCh <- nil
	}()

	for i := 0; i < 2; i++ {
		err := <-errCh
		if err != nil {
			term.OutputErrorAndExit("%v", err)
		}
	}

	var projectIds []string

	if lib.CurrentProjectId != "" {
		projectIds = append(projectIds, lib.CurrentProjectId)

View on GitHub (pinned to e2d772072e)

Solutions

  1. Verify child project directories exist and are accessible
  2. Check filesystem permissions and disk health/space
  3. Re-authenticate if user identity is stale
  4. Retry the command; if only timeouts were occurring, the command already succeeds silently

Example fix

// before
if err.Error() == "context timeout" {
    errCh <- nil
    return
}
errCh <- fmt.Errorf("error getting child project ids with paths: %v", err)
// after
if errors.Is(err, context.DeadlineExceeded) || err.Error() == "context timeout" {
    errCh <- nil
    return
}
errCh <- fmt.Errorf("error getting child project ids with paths: %w", err)
Defensive patterns

Strategy: fallback

Validate before calling

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

Try / catch

res, err := getChildProjectIdsWithPaths(ctx)
if err != nil {
    if errors.Is(err, context.DeadlineExceeded) {
        return nil, nil // treat as empty
    }
    return nil, err
}

Prevention

When it happens

Trigger: The child-project lookup returns an error other than 'context timeout' — e.g. filesystem read failure, permissions, or corrupted project state.

Common situations: Child project directories removed or moved on disk, permission errors on the data directory, I/O errors on slow or full disks.

Related errors


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