We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5b449b3 commit db934acCopy full SHA for db934ac
src/strands/experimental/bidi/agent/agent.py
@@ -399,9 +399,14 @@ async def run_outputs(inputs_task: asyncio.Task) -> None:
399
inputs_task.cancel()
400
outputs_task.cancel()
401
await asyncio.gather(inputs_task, outputs_task, return_exceptions=True)
402
+
403
if not isinstance(error, asyncio.CancelledError):
404
raise
405
406
+ run_task = asyncio.current_task()
407
+ if run_task and run_task.cancelling() > 0: # externally cancelled
408
+ raise
409
410
finally:
411
input_stops = [input_.stop for input_ in inputs if isinstance(input_, BidiInput)]
412
output_stops = [output.stop for output in outputs if isinstance(output, BidiOutput)]
0 commit comments