Skip to content

fix(run): cancel sibling work after concurrent failures - #4185

Merged
seratch merged 2 commits into
mainfrom
fix/run-sibling-cancellation
Aug 5, 2026
Merged

fix(run): cancel sibling work after concurrent failures#4185
seratch merged 2 commits into
mainfrom
fix/run-sibling-cancellation

Conversation

@seratch

@seratch seratch commented Aug 5, 2026

Copy link
Copy Markdown
Member

This pull request takes over the core fix proposed in #4142.

It ensures that when one SDK-owned concurrent run operation fails, its sibling operations are cancelled and drained before the original error is propagated. For parallel tool execution, it also carries the sibling-category failure signal into nested function-tool execution so existing bounded cleanup and post-invoke settlement behavior can complete while keeping parent cancellation prompt.

The implementation narrows the original approach by reusing the existing cancellation and function-tool lifecycle machinery without introducing global cancellation context or new public APIs. It preserves successful result ordering, streaming and non-streaming parity, and Python 3.10 compatibility.

The original contributor is credited through the commit's Co-authored-by trailer.

@seratch seratch added this to the 0.19.x milestone Aug 5, 2026
@seratch
seratch enabled auto-merge (squash) August 5, 2026 00:54
@seratch
seratch force-pushed the fix/run-sibling-cancellation branch from 90c384b to 53b0d37 Compare August 5, 2026 01:08
@seratch
seratch merged commit 4c9e507 into main Aug 5, 2026
9 checks passed
@seratch
seratch deleted the fix/run-sibling-cancellation branch August 5, 2026 01:15
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