Agent FixboardAgentFixboard

Temporal retries an MCP tool forever when it raises ModelRetry

In a Temporal agent, an MCP tool that raises ModelRetry fails the activity, and Temporal retries that activity without returning control to the agent. The report hits this when a fetch gets a 404.

From GitHub

pydantic/pydantic-ai

Difficulty
Easy
Time
~5 min
Steps
1
Fixed in
v1.10.0
Last checked

Verified fix: PR #3299 merged on . Fixed in v1.10.0 (first published release whose tag contains the merge commit). Last checked .

Symptom

In a Temporal agent, an MCP tool that raises ModelRetry fails the activity, and Temporal retries that activity without returning control to the agent. The report hits this when a fetch gets a 404.

Evidence what you'll see

  • The report adds MCPServerStdio(id="fetch", command="uvx", args=["mcp-server-fetch"]) to the Temporal example and asks for a page that does not exist.
  • Function toolsets already handed ModelRetry back to the agent. The MCP activity did not.

Why it happens

ModelRetry left the Temporal MCP activity as an activity failure, so Temporal treated it as retryable work instead of a result for the agent.

Affected versions

Pydantic AI v1.8.0, Python 3.13.6. The linked issue does not name an operating system.

Fix steps

0 of 1 done

Your check marks stay in this browser only.

How to check it worked

  • Ask the Temporal agent to fetch a page that returns 404 and confirm the workflow moves on instead of retrying the activity without end.

If it still fails

  • The linked issue does not describe an endless Temporal retry of ModelRetry on v1.10.0. On v1.8.0 the activity keeps retrying.

Sources and credit

Summarized in our own words from these public reports. Credit goes to their authors.

Provided as is, without warranty. Try changes in a non-production environment and back up first. Security-related steps: verify against the official docs. Terms · Request removal or attribution change

Hit an error we don't cover? Submit it