openai/codex · error · anyhow::Error
failed to refresh tools for MCP server
Error message
failed to refresh tools for MCP server '{CODEX_APPS_MCP_SERVER_NAME}' What it means
In apps_installed, after the hosted MCP server became ready, the code reads the current tools snapshot from codex_apps_tools_cache; when no snapshot is available for the cache key, this error is raised. It means the tools cache for the Codex apps MCP server could not be populated or read, so the installed-apps tool list cannot be returned.
Solutions
- Retry the refresh; the cache may populate after the MCP server finishes listing tools
- Inspect the tools cache write path and cache_key derivation for mismatches
- Check connectivity/auth to the hosted connector backend if snapshots never publish
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at codex-rs/app-server/src/request_processors/apps_processor/installed.rs:125 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of openai/codex@339751715c (2026-08-25).
Data as JSON: /api/errors/edbb3b772ce36f62.
Report an issue: GitHub.
Appendix: source
Thrown at codex-rs/app-server/src/request_processors/apps_processor/installed.rs:125
.await;
let result = if runtime
.latest_wait_for_server_ready(
CODEX_APPS_MCP_SERVER_NAME,
startup_timeout,
)
.await
{
mcp_manager
.codex_apps_tools_cache()
.current_snapshot(config.codex_home.to_path_buf(), cache_key.clone())
.ok_or_else(|| {
anyhow::anyhow!(
"hosted connector refresh completed without publishing a snapshot"
)
})
} else {
Err(anyhow::anyhow!(
"failed to refresh tools for MCP server '{CODEX_APPS_MCP_SERVER_NAME}'"
))
};
cancellation_token.cancel();
runtime.shutdown().await;
result
}
.await;
match refresh_result {
Ok(snapshot) => {
refresh_disposition = "success";
Some(snapshot)
}
Err(err) => {
refresh_disposition = "error";
retained_previous_snapshot = previous_snapshot.is_some();
return Err(internal_error(format!(View on GitHub (pinned to 339751715c)