plandex-ai/plandex · error
error walking the path %s: %s
Error message
error walking the path %s: %s
What it means
GetChildProjectIdsWithPaths wraps any error returned by filepath.WalkDir in this message naming the walked directory (Cwd). The sentinel 'context timeout' is treated specially and returns partial results instead.
Source
Thrown at app/cli/fs/projects.go:112
settings := settingsByAccount[currentUserId]
if settings == nil {
return nil
}
projectId := string(settings.Id)
childProjectIds = append(childProjectIds, [2]string{path, projectId})
}
}
return nil
})
if err != nil {
if err.Error() == "context timeout" {
return childProjectIds, nil
}
return nil, fmt.Errorf("error walking the path %s: %s", Cwd, err)
}
return childProjectIds, nil
}
View on GitHub (pinned to e2d772072e)
Solutions
- Fix or avoid the unreadable subdirectory named in the wrapped error
- Run the command as a user with read access to the whole tree, or skip restricted dirs
- If it was a timeout, increase the context deadline (timeout is handled separately)
- Re-run after resolving transient mount/IO issues
Example fix
// before chmod 000 /project/secrets plandex child-projects // after chmod 755 /project/secrets plandex child-projects
Defensive patterns
Strategy: fallback
Validate before calling
if fi, err := os.Stat(Cwd); err != nil || !fi.IsDir() {
return fmt.Errorf("cwd %s not walkable: %w", Cwd, err)
} Try / catch
ids, err := GetChildProjectIdsWithPaths(ctx)
if err != nil {
if strings.Contains(err.Error(), "context timeout") {
// partial results already returned upstream
} else {
log.Warn("project scan failed; using no child projects", "err", err)
ids = nil
}
} Prevention
- Ensure the whole tree under Cwd is readable by the running user
- Skip known-restricted directories before walking
- Remount failing drives/shares before scanning
- Distinguish the 'context timeout' sentinel from real walk failures
When it happens
Trigger: filepath.WalkDir reports a non-timeout error — typically a directory that cannot be read (permission denied) or Stat failing on a file during traversal.
Common situations: Walking trees containing unreadable system or permission-restricted directories; dangling entries on failing mounts; racing deletion of files during the walk.
Related errors
- error setting auth: %v
- error writing auth: %v
- error reading accounts.json: %v
- error walking directory: %s
- error checking for .plandexignore file: %s
AI-assisted analysis of plandex-ai/plandex@e2d772072e (2026-09-05).
Data as JSON: /api/errors/2b39d824500d0c5c.
Report an issue: GitHub.