multica-ai/multica · error
copy %s %s to %s: %w
Error message
copy %s %s to %s: %w
What it means
io.Copy from the opened source to the newly created destination failed mid-transfer. This is a read or write I/O error: source became unreadable, destination hit ENOSPC, or the filesystem dropped out.
Source
Thrown at server/internal/daemon/execenv/codex_home.go:1043
}
} else if !os.IsNotExist(err) {
return fmt.Errorf("stat %s copy %s: %w", key, relPath, err)
}
in, err := os.Open(src)
if err != nil {
return fmt.Errorf("open %s %s: %w", key, src, err)
}
defer in.Close()
out, err := root.OpenFile(relPath, os.O_WRONLY|os.O_CREATE|os.O_EXCL, 0o644)
if err != nil {
return fmt.Errorf("create %s copy %s: %w", key, relPath, err)
}
defer out.Close()
if _, err := io.Copy(out, in); err != nil {
return fmt.Errorf("copy %s %s to %s: %w", key, src, relPath, err)
}
// Close explicitly so a deferred write-back failure cannot be swallowed; the
// deferred Close then no-ops.
if err := out.Close(); err != nil {
return fmt.Errorf("close %s copy %s: %w", key, relPath, err)
}
return nil
}
// syncCodexModelsCache seeds models_cache.json once for a fresh task home and
// binds it to the shared provider/catalog configuration. Codex can replace the
// task-local cache after startup, so an unchanged binding preserves whatever
// the task last wrote rather than restoring a potentially stale shared copy.
//
// A changed or missing binding makes an existing cache unsafe: Codex's cache
// format (as of 0.144.x) records the client version and fetch time but not the
// provider identity. Reusing that cache after config.toml switches providers
// can therefore pair provider B with provider A's model catalog. Drop it andView on GitHub (pinned to 2c0912b6ec)
Solutions
- Free space on the volume holding the task home
- Retry the prepare — transient I/O errors usually clear
- Verify the source file is intact and readable
Defensive patterns
Strategy: retry
Validate before calling
var stat syscall.Statfs_t
if err := syscall.Statfs(codexHome, &stat); err == nil && stat.Bavail == 0 {
return fmt.Errorf("task home volume is full")
} Try / catch
if err := materialiseInCodexHome(...); err != nil {
if errors.Is(err, syscall.ENOSPC) {
// free space, then retry once
}
} Prevention
- Monitor free space on workspace volumes
- Alert on ENOSPC before tasks start, not after
When it happens
Trigger: Disk full in the task home; source file truncated or removed mid-copy; network filesystem read failure.
Common situations: Full disk on the workspace volume; NFS hiccup reading the shared config; very large model catalog file.
Related errors
- write temp file: %w
- close %s copy %s: %w
- write temp for %s: %w
- read --%s-file: %w
- read file for --%s: %w
AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15).
Data as JSON: /api/errors/8555f64c09f74fa1.
Report an issue: GitHub.