mvanhorn/last30days-skill · error
engine: ensure parent of %s: %w
Error message
engine: ensure parent of %s: %w
What it means
Error "engine: ensure parent of %s: %w" thrown in mvanhorn/last30days-skill.
Source
Thrown at mcp/internal/engine/extract.go:133
if path == "." {
return nil
}
target := filepath.Join(dst, path)
if d.IsDir() {
return os.MkdirAll(target, 0o755)
}
return copyEmbeddedFile(src, path, target)
})
}
func copyEmbeddedFile(src fs.FS, srcPath, dst string) error {
in, err := src.Open(srcPath)
if err != nil {
return fmt.Errorf("engine: open %s: %w", srcPath, err)
}
defer func() { _ = in.Close() }()
if err := os.MkdirAll(filepath.Dir(dst), 0o755); err != nil {
return fmt.Errorf("engine: ensure parent of %s: %w", dst, err)
}
out, err := os.OpenFile(dst, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0o644)
if err != nil {
return fmt.Errorf("engine: create %s: %w", dst, err)
}
defer func() { _ = out.Close() }()
if _, err := io.Copy(out, in); err != nil {
return fmt.Errorf("engine: write %s: %w", dst, err)
}
return nil
}
// onceRegistry serializes first-call extraction per cache directory so the
// rename in ensureLocked happens exactly once across goroutines.
var (
onceMu sync.Mutex
onceRegistry = map[string]*sync.Once{}
)View on GitHub (pinned to c7460f6114)
Solutions
- Ensure the cache directory tree is writable by the current user.
- Set LAST30DAYS_CACHE_DIR to a writable location and retry.
When it happens
Trigger: Fires when the engine cannot create the parent directory of a file it is about to write into the cache, usually due to unwritable cache-root permissions.
Common situations: See trigger scenarios.
AI-assisted analysis of mvanhorn/last30days-skill@c7460f6114 (2026-08-15).
Data as JSON: /api/errors/e0b4a090bfa2b57b.
Report an issue: GitHub.