Repository navigation
fix: stop native tool queues during function failure cleanup - #5446
Merged
Merged
Conversation
jbeckwith-oai
requested review from
a team,
rm-openai and
seratch
as code owners
October 27, 2026 18:52
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ed8fa0e004
ℹ️ 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".
dpiet-oai
approved these changes
Oct 27, 2026
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
This pull request fixes queued native tools continuing to run while a selected function-tool failure drains completed output, including after a parallel input guardrail rejects the input.
Selecting a function failure now cancels active native categories and closes their invocation queues. Cleanup preserves the selected error, bounded finalization of completed outputs, genuine caller cancellation, existing approvals, and rejected-input history exclusion. Native error conversion also enters bounded cleanup when cancellation occurred before finalization started. Already-cancelled native tasks receive the existing finalization grace period, then another cancellation if they remain pending; caller cancellation bypasses this grace. Public APIs, configuration, and persisted state are unchanged.
Test plan
/tmpand a writableXDG_STATE_HOME. The original checkout path containsuser, which collides with credential-redaction test fixtures; its default state directory is read-only. All 1,686 tracked files were compared by SHA-256 after verification. No test assertions or source files were changed for this environment adjustment.typing.castcorrection passed the repository type-erasure check and full verification.Issue number
No public issue.
Checks
.agents/skills/code-change-verification/scripts/run.sh/reviewbefore submitting this PR