{"record":{"id":"fd417acf074ae269","repo":"multica-ai/multica","slug":"read-config-toml-w-fd417a","errorCode":null,"errorMessage":"read config.toml: %w","messagePattern":"read config\\.toml: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/internal/daemon/execenv/codex_shell_env.go","lineNumber":264,"sourceCode":"\t}\n\n\tvar out bytes.Buffer\n\tprevious := 0\n\tfor _, r := range merged {\n\t\tout.Write(content[previous:r.start])\n\t\tprevious = r.end\n\t}\n\tout.Write(content[previous:])\n\treturn out.Bytes(), nil\n}\n\n// EnsureCodexShellEnvPolicyConfig replaces every user/profile shell policy in\n// the task-local config with one validated daemon-managed policy. The source\n// config in the user's shared Codex home is never modified.\nfunc EnsureCodexShellEnvPolicyConfig(configPath string, includeOnly []string, logger *slog.Logger) error {\n\tdata, err := os.ReadFile(configPath)\n\tif err != nil && !os.IsNotExist(err) {\n\t\treturn fmt.Errorf(\"read config.toml: %w\", err)\n\t}\n\n\twithoutManaged := []byte(shellEnvBlockRe.ReplaceAllString(string(data), \"\"))\n\tstripped, err := stripUserShellEnvPolicy(withoutManaged)\n\tif err != nil {\n\t\treturn err\n\t}\n\tblock, err := renderMulticaShellEnvBlock(includeOnly)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tbase := strings.TrimRight(string(stripped), \" \\t\\r\\n\")\n\tupdated := block\n\tif base != \"\" {\n\t\tupdated = base + \"\\n\\n\" + block\n\t}\n\tvar validated map[string]any","sourceCodeStart":246,"sourceCodeEnd":282,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/internal/daemon/execenv/codex_shell_env.go#L246-L282","documentation":"Error \"read config.toml: %w\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/internal/daemon/execenv/codex_shell_env.go:264 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check that config.toml is readable."],"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"}