AgentFixboard

Temporal retries an MCP tool forever when it raises ModelRetry

In a Temporal agent, an MCP tool that raises ModelRetry, such as a fetch that hits a 404, fails the activity, and Temporal retries it endlessly instead of handing control back to the agent.

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 stable release containing the merge commit). Last checked .

Symptom

In a Temporal agent, an MCP tool that raises ModelRetry, such as a fetch that hits a 404, fails the activity, and Temporal retries it endlessly instead of handing control back to the agent.

Evidence what you'll see

  • Reproduced by adding the mcp-server-fetch toolset to the Temporal example
  • The activity keeps retrying
  • Reported on version 1.8.0

Cause

The Temporal MCP activity let ModelRetry escape as an activity failure; only function toolsets passed it back to the agent as a result.

Fix steps

0 of 1 done

Your check marks stay in this browser only.

Verify the fix worked

  • Ask the Temporal agent to fetch a page that returns 404 and confirm the model gets a retry prompt and the workflow moves on.

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