Repository navigation
fix(runtime): preserve pending tool state and conversation order - #1198
Merged
yaozheng-fang merged 6 commits intoNov 3, 2026
Merged
Conversation
yaozheng-fang
approved these changes
Nov 3, 2026
yaozheng-fang
left a comment
Collaborator
There was a problem hiding this comment.
Reviewed the runtime continuation changes and regression evidence for e25c60c. All CI workflows passed; the installed wheel and cloud runtime passed the previously failing Codex split-result cases, multi-session runtime switching, and authenticated Studio tool pause/resume with reverse answers and refresh. Existing skipped/xfail cases and the independent Pi probe cases that did not produce a simultaneous batch remain documented.
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.
Submitting one result from a batch of external tools could restart the model while another tool was still waiting for an answer, producing a second question or tool call. Codex direct transport could also hang on a second interrupt, and PiAgent lost native call/result relationships when restoring history. Final answers could appear before reasoning after a database reload because they retained the turn-start timestamp.
This PR fixes those generic runtime contracts:
will_continue=Truestay pending; default Runner result submissions are associated with their original invocation. Explicit invocation ownership and response branches take precedence when IDs are reused. New user turns and other branches remain runnable.This is not tool-name/argument deduplication: a later user request can legitimately execute the same tool again. There are no public Agent/HTTP signature, runtime dependency, or sandbox-policy changes.
Validation for head
e25c60ca(2026-11-03):Before the final Codex translation fix, head
8942e869passed the full local repository suite (8152 passed, 52 skipped, 4 xfailed) and isolated-wheel runtime suite (767 passed, 39 skipped, 4 xfailed), but the subsequent live mixed-wait probe found the missing result. Those counts apply only to that earlier revision; the added CLI cases cover the previously missed path.An earlier runtime-only regression encountered an existing DeepSeek cleanup-test failure: its process-wide
atexit.registermock captured Python's firstweakref.finalizeregistration. The pre-change wheel reproduces it in the same dependency environment; no DeepSeek implementation or tests were changed. The final full local and isolated-wheel runtime suites passed, including that test; the earlier failure and baseline evidence remain recorded.The candidate wheel is
veadk_python-1.1.24.dev6+ge25c60ca5-py3-none-any.whl, SHA256fdefec3d4df7b36be002c7ea384db565a8ae7914755b9d5a7ad885c7a3bb66f6. Its development version comes from existing SCM versioning; no version metadata was edited and no release was published. Consumers pinned to 1.1.23 need a subsequent SDK release.Existing conformance xfails remain, including cancellation of an actively running Pi SDK bridged tool. BFF coroutine cancellation or Harness model cancellation does not establish coverage of that separate limitation. This follows the pending-tool support in #1197.