From 9be73ab0f8818f49c919692bfce240ad89f3dcaf Mon Sep 17 00:00:00 2001 From: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> Date: Sun, 1 Nov 2026 16:04:17 +0800 Subject: [PATCH] refactor(runtime): consume the Host stdout iterator directly Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com> --- loopx/control_plane/turn_driver/host_process_transport.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/loopx/control_plane/turn_driver/host_process_transport.py b/loopx/control_plane/turn_driver/host_process_transport.py index 247c04e9e9..44b7ebcdb2 100644 --- a/loopx/control_plane/turn_driver/host_process_transport.py +++ b/loopx/control_plane/turn_driver/host_process_transport.py @@ -346,10 +346,9 @@ def run_host_process( else: proc.stdin.write(frame) proc.stdin.flush() - lines = iter(proc.stdout) while True: event = (guarded.next(deadline=launch_deadline) if guarded is not None - else json.loads(line) if (line := next(lines, None)) is not None else None) + else json.loads(line) if (line := next(proc.stdout, None)) is not None else None) if event is None: break kind = event.get("kind")