Pydantic AI adds Azure Durable Task recovery for agent runs
Pydantic AI Harness now records model, tool and MCP operations as Durable Task activities so interrupted agent runs can reuse completed results, while external side effects remain subject to at-least-once execution.
Pydantic added Azure Durable Task execution to Pydantic AI Harness on November 16, turning model requests, function-tool calls, MCP calls and durable capability operations into recorded activities by default when an agent runs inside an orchestration.
The AzureDurableTaskDurability capability is designed to let another worker recover an interrupted run without repeating activities whose results were already stored. Pydantic and Microsoft describe that recovery and the resulting avoidance of repeated model costs as product capabilities; the supplied evidence does not include an independent production benchmark or customer reliability measurement.
Durable Task rebuilds an orchestration through event sourcing. Its runtime keeps an append-only execution history, reruns the orchestrator from the start after new work arrives and returns stored results for activities that already completed. Replay continues until the code reaches unfinished work, according to Microsoft’s Durable Task documentation.
Durable Task provides at-least-once activity execution, not exactly-once effects in an external system. If a worker changes an outside system and fails before the activity result is recorded, Durable Task may run that activity again. Microsoft advises making side-effecting activities idempotent, and Pydantic says the unchanged ctx.run_id and ctx.tool_call_id can be combined into an idempotency key.
In Pydantic’s synthetic emulator demonstration, the first worker completed two model requests and an order lookup, then was terminated after a refund tool ran but before the scheduler recorded its result. A second worker reused the three recorded results, reran the unrecorded refund activity and finished the orchestration. The refund tool executed twice, making the example a vendor demonstration of both recovery and the duplicate-side-effect risk rather than an independent production test.
The integration uses the standalone Durable Task Python SDK and does not require an Azure Functions app, Microsoft said in its integration post. Workers are deployed separately. Orchestrator-side hooks, instruction functions, output validators and inline tools run again during replay, so Pydantic says they must remain deterministic and avoid network, file or thread I/O.
Microsoft’s Durable Task Scheduler dashboard documentation says operators can inspect execution history and activity inputs and outputs. Microsoft’s integration post says the timeline can show model, tool and MCP activities along with duration and retry attempts. Pydantic’s integration documentation also warns that Pydantic AI Harness remains on 0.x releases and its API may change between minor versions.
More news

Superhuman expands Go across Docs and Mail as assistant rollout begins

Meta puts AI agents to work across ads-model rollouts

Google Cloud adds agent skills to Cluster Toolkit for HPC workflows
