openai/codex · error · anyhow::Error
tool call rejected because the catalog changed after `{}/{to
Error message
tool call rejected because the catalog changed after `{}/{tool_name}` was prepared What it means
Error "tool call rejected because the catalog changed after `{}/{tool_name}` was prepared" thrown in openai/codex.
Source
Thrown at codex-rs/codex-mcp/src/binding.rs:295
pub async fn call_with_preparation<F, Fut>(
&self,
requested_timeout: Option<Duration>,
prepare: F,
) -> Result<CallToolResult>
where
F: FnOnce() -> Fut,
Fut: Future<Output = Result<(Option<JsonValue>, Option<JsonValue>)>>,
{
let effective_timeout = match (self.client.tool_timeout, requested_timeout) {
(Some(server_timeout), Some(requested_timeout)) => {
Some(server_timeout.min(requested_timeout))
}
(server_timeout, requested_timeout) => server_timeout.or(requested_timeout),
};
let tool_name = self.tool_info.tool.name.to_string();
let current_revision = self.catalog_revision_source.read().await;
if *current_revision != self.catalog_revision {
return Err(anyhow::anyhow!(
"tool call rejected because the catalog changed after `{}/{tool_name}` was prepared",
self.server_name
));
}
let (arguments, meta) = prepare().await?;
let result = self
.client
.client
.call_tool(tool_name.clone(), arguments, meta, effective_timeout)
.await
.with_context(|| format!("tool call failed for `{}/{tool_name}`", self.server_name))?;
drop(current_revision);
Ok(call_tool_result_from_rmcp(result))
}
}
pub(crate) fn call_tool_result_from_rmcp(result: rmcp::model::CallToolResult) -> CallToolResult {
let content = resultView on GitHub (pinned to 339751715c)
When it happens
Trigger: Thrown at codex-rs/codex-mcp/src/binding.rs:295 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/90962c3cc8ab9913.
Report an issue: GitHub.