Repository navigation
fix: resume recursive agent tool approvals - #4414
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9dc7da9f2b
ℹ️ 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".
9dc7da9 to
1725a89
Compare
|
I independently validated the exact head The pre-fix head
The focused upstream suites are also green locally ( |
This pull request fixes approval resume through recursively nested
Agent.as_toolcalls.When a protected tool was nested behind two or more agent-tool edges, approving the flattened interruption from
RunResult.to_state()could leave the same interruption pending or allow the outer run to continue without executing the protected tool. The resume path now resolves the deepest nestedRunStatethat owns the approval and checks that owner’s decision ledger before deciding whether to rerun the pending agent tool.The change preserves existing checkpoint isolation and serialized
RunStatebehavior. Regression coverage verifies two- and three-edge nesting for bothRunner.runandRunner.run_streamed, including exactly-once protected-tool execution.ref: #4413 (comment)