Skip to content

feat(retry): allow applications to approve unsafe replays - #4319

Merged
seratch merged 1 commit into
mainfrom
feat/approve-unsafe-model-replay
Aug 9, 2026
Merged

feat(retry): allow applications to approve unsafe replays#4319
seratch merged 1 commit into
mainfrom
feat/approve-unsafe-model-replay

Conversation

@seratch

@seratch seratch commented Aug 9, 2026

Copy link
Copy Markdown
Member

This pull request supersedes #4313 and resolves #4283 by allowing an application retry policy to explicitly approve a provider-marked replay-unsafe non-streamed model request.

It adds RetryDecision.approve_unsafe_replay without changing existing positional parameters and exposes response-started and conversation-state facts through RetryPolicyContext. The default remains fail-closed: ordinary retries cannot bypass replay safety, stateful requests with unknown safety stay blocked, and aborts, streamed output, and Programmatic Tool Calling side-effect boundaries remain vetoes. Policy combinators preserve explicit approval, and unrecognized provider replay classifications normalize to unknown.

Documentation is intentionally deferred to a release-timed docs update because this behavior is not available in the latest published release.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a855aa61d3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/agents/retry.py
Comment thread src/agents/run_internal/model_retry.py
Co-authored-by: LeSingh1 <sshaurya914@gmail.com>
@seratch
seratch force-pushed the feat/approve-unsafe-model-replay branch from a855aa6 to bd2964e Compare August 9, 2026 07:19
@seratch
seratch merged commit 6115461 into main Aug 9, 2026
10 checks passed
@seratch
seratch deleted the feat/approve-unsafe-model-replay branch August 9, 2026 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow applications to explicitly approve replay-unsafe model retries

1 participant