{"record":{"id":"cfeff7dad99c83e7","repo":"openai/codex","slug":"failed-to-unregister-protected-create-target","errorCode":null,"errorMessage":"failed to unregister protected create target {}: {err}","messagePattern":"failed to unregister protected create target (.+?): (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"codex-rs/linux-sandbox/src/linux_run_main.rs","lineNumber":1133,"sourceCode":"                Ok(()) => {}\n                Err(err) if err.kind() == std::io::ErrorKind::NotFound => {}\n                Err(err) if err.kind() == std::io::ErrorKind::DirectoryNotEmpty => {}\n                Err(err) => panic!(\n                    \"failed to remove synthetic bubblewrap mount marker directory {}: {err}\",\n                    target.marker_dir.display()\n                ),\n            }\n        }\n    });\n}\n\nfn cleanup_protected_create_targets(targets: &[ProtectedCreateTargetRegistration]) -> bool {\n    with_synthetic_mount_registry_lock(|| {\n        for target in targets.iter().rev() {\n            match fs::remove_file(&target.marker_file) {\n                Ok(()) => {}\n                Err(err) if err.kind() == std::io::ErrorKind::NotFound => {}\n                Err(err) => panic!(\n                    \"failed to unregister protected create target {}: {err}\",\n                    target.target.path().display()\n                ),\n            }\n        }\n\n        let mut violation = false;\n        for target in targets.iter().rev() {\n            violation |= remove_protected_create_target(&target.target);\n            match fs::remove_dir(&target.marker_dir) {\n                Ok(()) => {}\n                Err(err) if err.kind() == std::io::ErrorKind::NotFound => {}\n                Err(err) if err.kind() == std::io::ErrorKind::DirectoryNotEmpty => {}\n                Err(err) => panic!(\n                    \"failed to remove protected create marker directory {}: {err}\",\n                    target.marker_dir.display()\n                ),\n            }","sourceCodeStart":1115,"sourceCodeEnd":1151,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/linux-sandbox/src/linux_run_main.rs#L1115-L1151","documentation":"Error \"failed to unregister protected create target {}: {err}\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/linux-sandbox/src/linux_run_main.rs:1133 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"}