plandex-ai/plandex · error
error checking for .plandexignore file: %s
Error message
error checking for .plandexignore file: %s
What it means
After Stat on .plandexignore returns a non-nil error, GetPlandexIgnore distinguishes 'not exist' (normal, returns nil) from any other Stat failure (permission denied, I/O error, path issues), which produces this wrapped error.
Source
Thrown at app/cli/fs/paths.go:364
PlandexIgnored: ignored,
IgnoredPaths: ignoredPaths,
GitIgnoredDirs: gitIgnoredDirs,
}, nil
}
func GetPlandexIgnore(dir string) (*ignore.GitIgnore, error) {
ignorePath := filepath.Join(dir, ".plandexignore")
if _, err := os.Stat(ignorePath); err == nil {
ignored, err := ignore.CompileIgnoreFile(ignorePath)
if err != nil {
return nil, fmt.Errorf("error reading .plandexignore file: %s", err)
}
return ignored, nil
} else if !os.IsNotExist(err) {
return nil, fmt.Errorf("error checking for .plandexignore file: %s", err)
}
return nil, nil
}
func GetBaseDirForContexts(contexts []*shared.Context) string {
var paths []string
for _, context := range contexts {
if context.FilePath != "" {
paths = append(paths, context.FilePath)
}
}
return GetBaseDirForFilePaths(paths)
}
func GetBaseDirForFilePaths(paths []string) string {View on GitHub (pinned to e2d772072e)
Solutions
- Check permissions on the project directory and .plandexignore path (ls -la, fix with chmod/chown)
- Remove or repair broken symlinks along the path
- Run the CLI from a healthy local directory instead of a flaky network mount
- Inspect the wrapped err to identify the exact syscall failure
Example fix
// before chmod 000 project/ // after chmod 755 project/
Defensive patterns
Strategy: fallback
Validate before calling
ignorePath := filepath.Join(dir, ".plandexignore")
if _, err := os.Stat(filepath.Dir(ignorePath)); err != nil {
return fmt.Errorf("project dir not accessible: %w", err)
} Try / catch
ignored, err := GetPlandexIgnore(dir)
if err != nil {
log.Warn("continuing without .plandexignore", "err", err)
ignored = nil // proceed with empty ignore rules
} Prevention
- Keep project directories readable/executable by the running user
- Avoid symlink loops inside the project tree
- Don't run the CLI from stale network mounts
- Test in a fresh clone when Stat errors appear mysteriously
When it happens
Trigger: os.Stat(.plandexignore) fails with an error other than fs.ErrNotExist — typically EACCES on a parent directory, ELOOP from a symlink cycle, or I/O errors on network filesystems.
Common situations: Running in a directory where a parent dir lost execute permission; .plandexignore is a broken symlink loop; NFS/NAS mounts returning stale file handles.
Understand the failure class
Background: Permission denied / not authorized / 403 Forbidden: access-control rejections when the caller lacks the required role, grant, or ownership — this error's family across 18 libraries.
Related errors
- error checking if file exists: %v
- error setting auth: %v
- error writing auth: %v
- error reading accounts.json: %v
- error walking directory: %s
AI-assisted analysis of plandex-ai/plandex@e2d772072e (2026-09-05).
Data as JSON: /api/errors/43070808d5126b7c.
Report an issue: GitHub.