Skip to content

fix(run): preserve completed tool guardrail results - #4180

Merged
seratch merged 1 commit into
mainfrom
fix/tool-guardrail-results-on-run-errors
Aug 5, 2026
Merged

fix(run): preserve completed tool guardrail results#4180
seratch merged 1 commit into
mainfrom
fix/tool-guardrail-results-on-run-errors

Conversation

@seratch

@seratch seratch commented Aug 5, 2026

Copy link
Copy Markdown
Member

This pull request fixes missing tool input and output guardrail results in RunErrorDetails when a run fails after one or more completed turns.

This work follows #4127 (the original contributor is credited through a Co-authored-by trailer in the commit.). That PR identified the underlying observability gap and explored several failure and cancellation paths. During maintainer review, we narrowed the supported contract to results from completed turns, avoiding a broader contract for partial results from aborted, discarded, or canceled work.

The implementation forwards the existing completed-turn accumulators through streaming and non-streaming error paths. It preserves the released positional constructor prefix. The currently triggering tool guardrail remains available through exception.guardrail and exception.output.

Forward completed-turn tool guardrail results through runner-managed error details while preserving constructor compatibility.

Co-authored-by: LHMQ878 <LHMQ878@users.noreply.github.com>
@seratch seratch added this to the 0.19.x milestone Aug 5, 2026
@seratch
seratch merged commit fb24afc into main Aug 5, 2026
9 checks passed
@seratch
seratch deleted the fix/tool-guardrail-results-on-run-errors branch August 5, 2026 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant