{"record":{"id":"5e1a92ffacde05ce","repo":"multica-ai/multica","slug":"s-q-must-be-a-local-relative-path-or-an-absolute","errorCode":null,"errorMessage":"%s %q must be a local relative path or an absolute path","messagePattern":"(.+?) %q must be a local relative path or an absolute path","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/internal/daemon/execenv/codex_home.go","lineNumber":935,"sourceCode":"\tif os.IsNotExist(err) {\n\t\treturn fmt.Errorf(\"%s %q resolved to missing file %s: %w\", key, referencedPath, src, err)\n\t}\n\tif err != nil {\n\t\t// Not a confident absence — a permission or IO failure must not be\n\t\t// reported as \"the file isn't there\", which sends operators looking for\n\t\t// the wrong problem.\n\t\treturn fmt.Errorf(\"%s %q: cannot stat source %s: %w\", key, referencedPath, src, err)\n\t}\n\n\tif filepath.IsAbs(referencedPath) || strings.HasPrefix(referencedPath, \"~\") {\n\t\treturn nil\n\t}\n\tif !info.Mode().IsRegular() {\n\t\treturn fmt.Errorf(\"%s %q resolved to %s, which is not a regular file\", key, referencedPath, src)\n\t}\n\tcleanReferencedPath := filepath.Clean(referencedPath)\n\tif !filepath.IsLocal(cleanReferencedPath) {\n\t\treturn fmt.Errorf(\"%s %q must be a local relative path or an absolute path\", key, referencedPath)\n\t}\n\treturn materialiseInCodexHome(codexHome, cleanReferencedPath, src, key)\n}\n\n// openVerifiedCodexHomeRoot opens codexHome as a confinement root and only\n// returns it once the opened directory is proven to still BE codexHome.\n//\n// Checking the path first and opening it second is not enough: os.OpenRoot\n// resolves the path it is given, so a directory swapped for a link to somewhere\n// else between the check and the open yields a root that is happily confined —\n// to the wrong tree. Every subsequent root-scoped write would then land outside\n// the task home without ever \"escaping\" its root.\n//\n// That window is not hypothetical here. Task homes are reused, and on Windows\n// only the direct Codex process is terminated — descendant cleanup cannot be\n// confirmed (see server/pkg/agent/proc_windows.go) — so a leftover process that\n// knows its old CODEX_HOME can still act on it. Any local process can create the\n// same window on other platforms.","sourceCodeStart":917,"sourceCodeEnd":953,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/internal/daemon/execenv/codex_home.go#L917-L953","documentation":"Error \"%s %q must be a local relative path or an absolute path\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/internal/daemon/execenv/codex_home.go:935 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a local relative path or an absolute path for the reference."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}