From ecf4aed28b0cf7c18d4d8ff554883ba182fc6bdd Mon Sep 17 00:00:00 2001 From: tobitege <10787084+tobitege@users.noreply.github.com> Date: Sun, 15 Sep 2024 18:50:10 +0200 Subject: [PATCH] (fix) Update logs after run_action (EventStreamRuntime) (#3870) --- openhands/runtime/client/runtime.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openhands/runtime/client/runtime.py b/openhands/runtime/client/runtime.py index 73ce7d548d24..b295ff26c671 100644 --- a/openhands/runtime/client/runtime.py +++ b/openhands/runtime/client/runtime.py @@ -426,7 +426,6 @@ def run_action(self, action: Action) -> Observation: output = response.json() obs = observation_from_dict(output) obs._cause = action.id # type: ignore[attr-defined] - return obs else: error_message = response.text logger.error(f'Error from server: {error_message}') @@ -437,6 +436,8 @@ def run_action(self, action: Action) -> Observation: except Exception as e: logger.error(f'Error during command execution: {e}') obs = ErrorObservation(f'Command execution failed: {str(e)}') + # Refresh docker logs + self._wait_until_alive() return obs def run(self, action: CmdRunAction) -> Observation: