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
Closes #1310.
Make failed-run recovery idempotent without discarding messages persisted after the pre-run snapshot.
stream.to_input_list()already contains the SDK's input history. Prepending the snapshot duplicates previous messages and tool exchanges each time recovery runs. The existing test hid this because its stream stub returned only new messages.BEGIN IMMEDIATEtransaction, with rollback on failure.Changes
httpx.MockTransport.Scope
Only four source/test files are included. This PR does not add a model-input validator, change model/provider configuration, bump versions, migrate existing scan databases, or re-execute tools. All test data is synthetic; no scan artifacts are included.
The missing-tool-output provider error motivated the investigation, but this change targets the independently reproduced recovery defect. It does not claim to explain every cause of that error.
Verification
84f4108195fb516d48745aa912ba8862c7360ebb.tests/test_tool_history_recovery.py,tests/test_execution.py, andtests/test_session_fd.py.openai-agents==0.19.0/openai==2.53.0andopenai-agents==0.19.4/openai==2.54.0, on Python 3.13.3.git diff --checkpass.tests/test_install_script.py::test_installer_downloads_and_runs_linux_arm64_releasetests/test_install_script.py::test_installer_rejects_unsupported_architecturetests/test_pricing.py::test_resolves_common_bare_model_namesThis PR is a draft because the repository-wide checks are not fully green in this environment. No failures have been hidden with new skips or xfails. The recovery regression suite is green on both SDK versions; the failures above and the existing Pyright diagnostics are unchanged from the base.
Reproducible focused command: