fix(agent): stop retrying deterministic provider errors - #2813
Merged
Merged
Conversation
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.
Summary
Fixes #2690
Type and Areas
Type: Bug fix
Areas: Rust core / Agent execution, CLI integration tests, developer documentation
Motivation / Impact
The round executor checked only the remaining attempt budget, so deterministic provider rejections could resend the same request up to 10 times before surfacing the error.
These errors now stop after the first failed attempt. Context overflow starts compression immediately, and the subsequent model request uses the compressed context. Network failures, rate limits, timeouts, service unavailability, and malformed or unclassified responses retain bounded retry behavior.
Logs now distinguish non-retryable errors from exhausted retry budgets.
Verification
cargo test --locked --offline -p openbitfun-core --no-default-features --features agent-runtime,git --lib agentic::execution::round_executor::testscargo test --locked --offline -p openbitfun-cli --test cli_command_contracts exec_cli_contracts::stream_json_pnpm run fmt:rs— passed.git diff --check— passed.Tests ran on Windows using local mock providers. Remote workspace, remote control, Peer Device Mode, and Detached Dispatch were not exercised.
Reviewer Notes
The retry decision remains in the shared round executor. Adapter calls still make one attempt, preserving the single 10-attempt budget without restoring nested retries.
The execution policy intentionally preserves retries for
ModelErrorandUnknown; those categories do not prove that a request is permanently invalid.No protocol or persisted data shapes change.
Checklist