{"record":{"id":"3ec1e6db56e32639","repo":"openai/codex","slug":"context-err","errorCode":null,"errorMessage":"{context}: {err}","messagePattern":"\\{context\\}: \\{err\\}","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"codex-rs/linux-sandbox/src/linux_run_main.rs","lineNumber":1492,"sourceCode":"    signal_forwarders.restore();\n    cleanup_signal_mask.restore();\n    if libc::WIFSIGNALED(status) {\n        exit_with_wait_status(status);\n    }\n\n    String::from_utf8_lossy(&stderr_bytes).into_owned()\n}\n\n/// Close an owned file descriptor and panic with context on failure.\n///\n/// We use explicit close() checks here (instead of ignoring return codes)\n/// because this code runs in low-level sandbox setup paths where fd leaks or\n/// close errors can mask the root cause of later failures.\nfn close_fd_or_panic(fd: libc::c_int, context: &str) {\n    let close_res = unsafe { libc::close(fd) };\n    if close_res < 0 {\n        let err = std::io::Error::last_os_error();\n        panic!(\"{context}: {err}\");\n    }\n}\n\nfn is_proc_mount_failure(stderr: &str) -> bool {\n    stderr.contains(\"Can't mount proc\")\n        && stderr.contains(\"/newroot/proc\")\n        && (stderr.contains(\"Invalid argument\")\n            || stderr.contains(\"Operation not permitted\")\n            || stderr.contains(\"Permission denied\"))\n}\n\nstruct InnerSeccompCommandArgs<'a> {\n    sandbox_policy_cwd: &'a Path,\n    command_cwd: Option<&'a Path>,\n    permission_profile: &'a PermissionProfile,\n    allow_network_for_proxy: bool,\n    proxy_route_spec: Option<String>,\n    command: Vec<String>,","sourceCodeStart":1474,"sourceCodeEnd":1510,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/linux-sandbox/src/linux_run_main.rs#L1474-L1510","documentation":"Error \"{context}: {err}\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/linux-sandbox/src/linux_run_main.rs:1492 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","schemaVersion":2},"datasetVersion":"2026-08-25T06:17:31.827Z"}