fix: stop streamed tool execution after known input guardrail tripwire#2688
fix: stop streamed tool execution after known input guardrail tripwire#2688
Conversation
c2d0c73 to
15a3045
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 15a304514b
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8f03cc1a5b
ℹ️ 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".
e85ae18 to
623000c
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 623000cd98
ℹ️ 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".
Co-authored-by: Codex <noreply@openai.com>
d111c2f to
25fb1d1
Compare
This pull request fixes a streaming-only guardrail race where
Runner.run_streamed()could still execute same-turn tool side effects after a parallel input guardrail tripwire had already been observed.The change keeps the released
run_in_parallel=Truecontract intact for still-running guardrails, but adds a narrow hardening checkpoint for the streaming path once a tripwire is already known. The streaming guardrail runner now records the first triggered result immediately, and streamed turn resolution checks for that state before executing tools or other same-turn side effects.This also adds regression coverage for the streaming-specific case while preserving the existing tests that document the broader parallel guardrail semantics.