{"record":{"id":"f3a4d973088948c2","repo":"openai/codex","slug":"helperlogfailed","errorCode":"HelperLogFailed","errorMessage":"failed to write setup log line: {err}","messagePattern":"failed to write setup log line: (.+?)","errorType":"error_code","errorClass":"SetupFailure","httpStatus":null,"severity":"error","filePath":"codex-rs/windows-sandbox-rs/src/bin/setup_main/win.rs","lineNumber":122,"sourceCode":"    #[serde(default)]\n    mode: SetupMode,\n    #[serde(default)]\n    refresh_only: bool,\n}\n\n#[derive(Debug, Clone, Copy, Deserialize, Serialize, PartialEq, Eq, Default)]\n#[serde(rename_all = \"kebab-case\")]\nenum SetupMode {\n    #[default]\n    Full,\n    ProvisionOnly,\n    ReadAclsOnly,\n}\n\nfn log_line(log: &mut dyn Write, msg: &str) -> Result<()> {\n    let ts = chrono::Utc::now().to_rfc3339();\n    writeln!(log, \"[{ts}] {msg}\").map_err(|err| {\n        anyhow::Error::new(SetupFailure::new(\n            SetupErrorCode::HelperLogFailed,\n            format!(\"failed to write setup log line: {err}\"),\n        ))\n    })?;\n    Ok(())\n}\n\nfn workspace_write_cap_sids_for_path(\n    codex_home: &Path,\n    command_cwd: &Path,\n    write_roots: &[PathBuf],\n    path: &Path,\n) -> Result<Vec<String>> {\n    let mut sid_strs = Vec::new();\n    for root in write_roots {\n        if workspace_write_root_overlaps_path(root, path) {\n            sid_strs.push(workspace_write_cap_sid_for_root(\n                codex_home,","sourceCodeStart":104,"sourceCodeEnd":140,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/windows-sandbox-rs/src/bin/setup_main/win.rs#L104-L140","documentation":"writeln! to the setup log writer failed while appending a timestamped log line. The error is wrapped as HelperLogFailed; because the log may be broken (disk full, handle closed, ACL blocking writes), the step aborts rather than silently continuing without diagnostics.","triggerScenarios":"Thrown at codex-rs/windows-sandbox-rs/src/bin/setup_main/win.rs:122 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the io::Error: disk-full and permission-denied on the sandbox log directory are the common causes","Ensure the sandbox directory ACL permits the setup identity to write the log file","Free disk space or fix directory permissions and re-run setup"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}