diff --git a/deployment/runtime/agent/main-websocket.py b/deployment/runtime/agent/main-websocket.py index 2882280..eb2029a 100644 --- a/deployment/runtime/agent/main-websocket.py +++ b/deployment/runtime/agent/main-websocket.py @@ -599,7 +599,9 @@ async def stream_agent_events( yield {"start": True} continue if event_data.get("complete"): - yield {"complete": True, "response": final_response} + # Strands emits this lifecycle marker before its AgentResult. + # The client treats completion as terminal, so wait for the + # result event below instead of closing the stream early. continue if event_data.get("force_stop"): yield {