{"record":{"id":"e3ea7c2754a7f0a0","repo":"multica-ai/multica","slug":"create-codex-home-dir-w","errorCode":null,"errorMessage":"create codex-home dir: %w","messagePattern":"create codex-home dir: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/internal/daemon/execenv/codex_home.go","lineNumber":206,"sourceCode":"\tdefault:\n\t\t// A read error (permission/IO) on a file the daemon just wrote.\n\t\treturn windowsSandboxUndecidable\n\t}\n}\n\n// prepareCodexHomeWithOpts creates a per-task CODEX_HOME directory and seeds\n// it with config from the shared ~/.codex/ home. Auth is symlinked (shared),\n// config files are copied (isolated). The per-task config.toml gets a\n// daemon-managed sandbox block picked by codexSandboxPolicyFor.\nfunc prepareCodexHomeWithOpts(codexHome string, opts CodexHomeOptions, logger *slog.Logger) error {\n\tsharedHome := resolveSharedCodexHome()\n\tfreshHome := false\n\tif _, err := os.Lstat(codexHome); os.IsNotExist(err) {\n\t\tfreshHome = true\n\t}\n\n\tif err := os.MkdirAll(codexHome, 0o755); err != nil {\n\t\treturn fmt.Errorf(\"create codex-home dir: %w\", err)\n\t}\n\n\t// Give the task its own local sessions/ directory instead of symlinking the\n\t// shared ~/.codex/sessions in — a huge shared history would otherwise stall\n\t// Codex's `initialize` state backfill (MUL-4424). See prepareCodexSessionsDir.\n\tif err := prepareCodexSessionsDir(codexHome, sharedHome, opts, logger); err != nil {\n\t\tlogger.Warn(\"execenv: codex-home sessions dir prepare failed\", \"error\", err)\n\t}\n\n\t// Symlink shared files (auth).\n\tfor _, name := range codexSymlinkedFiles {\n\t\tsrc := filepath.Join(sharedHome, name)\n\t\tdst := filepath.Join(codexHome, name)\n\t\tif err := ensureSymlink(src, dst); err != nil {\n\t\t\tlogger.Warn(\"execenv: codex-home symlink failed\", \"file\", name, \"error\", err)\n\t\t}\n\t}\n","sourceCodeStart":188,"sourceCodeEnd":224,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/internal/daemon/execenv/codex_home.go#L188-L224","documentation":"Error \"create codex-home dir: %w\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/internal/daemon/execenv/codex_home.go:206 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check disk space and permissions for the codex-home directory."],"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"}