{"record":{"id":"49c9c1f1bcb31c48","repo":"openai/codex","slug":"timed-out-after-acquire-timeout-waiting-for-mc","errorCode":null,"errorMessage":"timed out after {acquire_timeout:?} waiting for MCP OAuth {store} aggregate-store lock {}","messagePattern":"timed out after (.+?) waiting for MCP OAuth (.+?) aggregate-store lock (.+?)","errorType":"exception","errorClass":"OAuthStoreLockFailure","httpStatus":null,"severity":"error","filePath":"codex-rs/rmcp-client/src/oauth/store_lock.rs","lineNumber":188,"sourceCode":"        store: OAuthStore,\n        #[source]\n        source: io::Error,\n    },\n    #[error(\"failed to create MCP OAuth {store} aggregate-store lock directory {}\", path.display())]\n    CreateDir {\n        store: OAuthStore,\n        path: PathBuf,\n        #[source]\n        source: io::Error,\n    },\n    #[error(\"failed to open MCP OAuth {store} aggregate-store lock {}\", path.display())]\n    Open {\n        store: OAuthStore,\n        path: PathBuf,\n        #[source]\n        source: io::Error,\n    },\n    #[error(\n        \"timed out after {acquire_timeout:?} waiting for MCP OAuth {store} aggregate-store lock {}\",\n        path.display()\n    )]\n    Timeout {\n        store: OAuthStore,\n        path: PathBuf,\n        acquire_timeout: Duration,\n    },\n    #[error(\"failed to lock MCP OAuth {store} aggregate-store lock {}\", path.display())]\n    Lock {\n        store: OAuthStore,\n        path: PathBuf,\n        #[source]\n        source: io::Error,\n    },\n}\n\nfn oauth_store_lock_path(codex_home: &Path, store: OAuthStore) -> PathBuf {","sourceCodeStart":170,"sourceCodeEnd":206,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/rmcp-client/src/oauth/store_lock.rs#L170-L206","documentation":"Raised when another codex process held the MCP OAuth aggregate-store lock past acquire_timeout while this process waited; it gives up to avoid an unbounded wait rather than risk interleaved read-modify-write of the credential store.","triggerScenarios":"Thrown at codex-rs/rmcp-client/src/oauth/store_lock.rs:188 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the store operation after the other process finishes","Find and terminate a hung codex process holding the lock","Remove the stale lock file if no other process is running","Increase the acquire timeout under heavy multi-process usage"],"exampleFix":null,"handlingStrategy":"retry","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"}