{"record":{"id":"8555f64c09f74fa1","repo":"multica-ai/multica","slug":"copy-s-s-to-s-w","errorCode":null,"errorMessage":"copy %s %s to %s: %w","messagePattern":"copy (.+?) (.+?) to (.+?): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/internal/daemon/execenv/codex_home.go","lineNumber":1043,"sourceCode":"\t\t}\n\t} else if !os.IsNotExist(err) {\n\t\treturn fmt.Errorf(\"stat %s copy %s: %w\", key, relPath, err)\n\t}\n\n\tin, err := os.Open(src)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"open %s %s: %w\", key, src, err)\n\t}\n\tdefer in.Close()\n\n\tout, err := root.OpenFile(relPath, os.O_WRONLY|os.O_CREATE|os.O_EXCL, 0o644)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"create %s copy %s: %w\", key, relPath, err)\n\t}\n\tdefer out.Close()\n\n\tif _, err := io.Copy(out, in); err != nil {\n\t\treturn fmt.Errorf(\"copy %s %s to %s: %w\", key, src, relPath, err)\n\t}\n\t// Close explicitly so a deferred write-back failure cannot be swallowed; the\n\t// deferred Close then no-ops.\n\tif err := out.Close(); err != nil {\n\t\treturn fmt.Errorf(\"close %s copy %s: %w\", key, relPath, err)\n\t}\n\treturn nil\n}\n\n// syncCodexModelsCache seeds models_cache.json once for a fresh task home and\n// binds it to the shared provider/catalog configuration. Codex can replace the\n// task-local cache after startup, so an unchanged binding preserves whatever\n// the task last wrote rather than restoring a potentially stale shared copy.\n//\n// A changed or missing binding makes an existing cache unsafe: Codex's cache\n// format (as of 0.144.x) records the client version and fetch time but not the\n// provider identity. Reusing that cache after config.toml switches providers\n// can therefore pair provider B with provider A's model catalog. Drop it and","sourceCodeStart":1025,"sourceCodeEnd":1061,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/internal/daemon/execenv/codex_home.go#L1025-L1061","documentation":"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.","triggerScenarios":"Disk full in the task home; source file truncated or removed mid-copy; network filesystem read failure.","commonSituations":"Full disk on the workspace volume; NFS hiccup reading the shared config; very large model catalog file.","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"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"var stat syscall.Statfs_t\nif err := syscall.Statfs(codexHome, &stat); err == nil && stat.Bavail == 0 {\n\treturn fmt.Errorf(\"task home volume is full\")\n}","typeGuard":null,"tryCatchPattern":"if err := materialiseInCodexHome(...); err != nil {\n\tif errors.Is(err, syscall.ENOSPC) {\n\t\t// free space, then retry once\n\t}\n}","preventionTips":["Monitor free space on workspace volumes","Alert on ENOSPC before tasks start, not after"],"tags":["filesystem","io","disk-full"],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}