{"record":{"id":"edbb3b772ce36f62","repo":"openai/codex","slug":"failed-to-refresh-tools-for-mcp-server-codex-app","errorCode":null,"errorMessage":"failed to refresh tools for MCP server '{CODEX_APPS_MCP_SERVER_NAME}'","messagePattern":"failed to refresh tools for MCP server '(.+?)'","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/app-server/src/request_processors/apps_processor/installed.rs","lineNumber":125,"sourceCode":"                    .await;\n\n                    let result = if runtime\n                        .latest_wait_for_server_ready(\n                            CODEX_APPS_MCP_SERVER_NAME,\n                            startup_timeout,\n                        )\n                        .await\n                    {\n                        mcp_manager\n                            .codex_apps_tools_cache()\n                            .current_snapshot(config.codex_home.to_path_buf(), cache_key.clone())\n                            .ok_or_else(|| {\n                                anyhow::anyhow!(\n                                    \"hosted connector refresh completed without publishing a snapshot\"\n                                )\n                            })\n                    } else {\n                        Err(anyhow::anyhow!(\n                            \"failed to refresh tools for MCP server '{CODEX_APPS_MCP_SERVER_NAME}'\"\n                        ))\n                    };\n                    cancellation_token.cancel();\n                    runtime.shutdown().await;\n                    result\n                }\n                .await;\n\n                match refresh_result {\n                    Ok(snapshot) => {\n                        refresh_disposition = \"success\";\n                        Some(snapshot)\n                    }\n                    Err(err) => {\n                        refresh_disposition = \"error\";\n                        retained_previous_snapshot = previous_snapshot.is_some();\n                        return Err(internal_error(format!(","sourceCodeStart":107,"sourceCodeEnd":143,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/app-server/src/request_processors/apps_processor/installed.rs#L107-L143","documentation":"Error \"failed to refresh tools for MCP server '{CODEX_APPS_MCP_SERVER_NAME}'\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/app-server/src/request_processors/apps_processor/installed.rs:125 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"}