{"record":{"id":"00efc98c55ccf947","repo":"openai/codex","slug":"timed-out-waiting-for-daemon-operation-lock","errorCode":null,"errorMessage":"timed out waiting for daemon operation lock {}","messagePattern":"timed out waiting for daemon operation lock (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/app-server-daemon/src/lib.rs","lineNumber":718,"sourceCode":"    ) -> BackendPaths {\n        BackendPaths {\n            codex_bin: managed_codex_bin.to_path_buf(),\n            pid_file: self.pid_file.clone(),\n            update_pid_file: self.update_pid_file.clone(),\n            remote_control_enabled: settings.remote_control_enabled,\n        }\n    }\n\n    async fn load_settings(&self) -> Result<DaemonSettings> {\n        DaemonSettings::load(&self.settings_file).await\n    }\n\n    async fn acquire_operation_lock(&self) -> Result<tokio::fs::File> {\n        let operation_lock = self.open_operation_lock_file().await?;\n        let deadline = tokio::time::Instant::now() + OPERATION_LOCK_TIMEOUT;\n        while !try_lock_file(&operation_lock)? {\n            if tokio::time::Instant::now() >= deadline {\n                return Err(anyhow!(\n                    \"timed out waiting for daemon operation lock {}\",\n                    self.operation_lock_file.display()\n                ));\n            }\n            sleep(START_POLL_INTERVAL).await;\n        }\n        Ok(operation_lock)\n    }\n\n    async fn open_operation_lock_file(&self) -> Result<tokio::fs::File> {\n        if let Some(parent) = self.operation_lock_file.parent() {\n            tokio::fs::create_dir_all(parent).await.with_context(|| {\n                format!(\n                    \"failed to create daemon state directory {}\",\n                    parent.display()\n                )\n            })?;\n        }","sourceCodeStart":700,"sourceCodeEnd":736,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/app-server-daemon/src/lib.rs#L700-L736","documentation":"Error \"timed out waiting for daemon operation lock {}\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/app-server-daemon/src/lib.rs:718 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"}