Repository navigation
Conversation
vatsrahul1001
approved these changes
Sep 29, 2026
Contributor
|
Test failing needs to be looked at here |
Contributor
|
3.0.6 is failing on the |
kaxil
force-pushed
the
durable-no-progress
branch
from
September 29, 2026 20:21
c3e738e to
065008e
Compare
With durable=True a retry replays every cached step, and replayed steps count toward usage_limits like live ones, so a retry of a run that reached its limit usually stops at the same step. The task log only showed the same UsageLimitExceeded on every try, with nothing saying why the retries could not help. AgentOperator now logs a warning when a durable run reaches a usage limit, saying the retry replays toward the same limit and that raising usage_limits is what lets the run go further. Retry behaviour is unchanged, and the durable execution docs say the same.
kaxil
force-pushed
the
durable-no-progress
branch
from
September 29, 2026 23:46
065008e to
b582ff3
Compare
Lee-W
approved these changes
Sep 30, 2026
Member
Author
|
Closing: #73706 made the premise of this PR obsolete. Its |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With
durable=True, a retry replays every cached model response and tool call, and replayed steps count towardusage_limitslike live ones. A run that reached its limit therefore usually stops at the same step on every retry. Until now the task log only showed the sameUsageLimitExceededon each try, with nothing saying why the retries were not helping.AgentOperatornow logs a warning when a durable run reaches a usage limit. It includes the error, says a retry will likely stop at the same step if that is the task's own limit, and says that raisingusage_limitsis what lets the run go further. The durable execution guide says the same, including that an unsetusage_limitsstill caps a run at pydantic-ai's default of 50 requests. Retry behaviour does not change.Why not stop retrying instead. Failing the task once a retry reaches the limit purely from the cache looks like the obvious fix, but that only holds when everything in the run replays exactly. Several things run live on every attempt and can change the outcome: output functions and validators, tools asking for a retry, tool results the cache could not store, tools on routes the cache does not wrap, and agents run inside a tool, which can add their own usage or hit their own limits. Each of these can make an attempt look fully replayed and still leave a later attempt able to finish, so an operator-side fail-fast would sometimes drop a retry that would have succeeded. A redundant retry that only replays costs no model tokens, so the warning is the trade worth making.
Run end to end on a local Airflow 3.4.0 with a durable agent,
usage_limits={"request_limit": 1}andretries=1. On try 1 the run makes its model call and tool call live, reaches the limit, and logs the warning:On try 2 both steps replay from the cache (
replayed 2 cached steps ... cached 0 new steps) and the run stops at the same limit, as the warning says: