Skip to content

πŸ™Œ OpenHands: AI-Driven Development

fix up lockup when long actions are run (#5144)

Robert Brennancde7ce49be49
diff --git a/openhands/runtime/action_execution_server.py b/openhands/runtime/action_execution_server.py
index aeb0d4c7a4..1251aa3468 100644
--- a/openhands/runtime/action_execution_server.py
+++ b/openhands/runtime/action_execution_server.py
@@ -52,7 +52,7 @@ from openhands.runtime.utils.bash import BashSession
from openhands.runtime.utils.files import insert_lines, read_lines
from openhands.runtime.utils.runtime_init import init_user_and_working_directory
from openhands.runtime.utils.system import check_port_available
-from openhands.utils.async_utils import wait_all
+from openhands.utils.async_utils import call_sync_from_async, wait_all
class ActionRequest(BaseModel):
@@ -170,7 +170,8 @@ class ActionExecutor:
async def run(
self, action: CmdRunAction
) -> CmdOutputObservation | ErrorObservation:
- return self.bash_session.run(action)
+ obs = await call_sync_from_async(self.bash_session.run, action)
+ return obs
async def run_ipython(self, action: IPythonRunCellAction) -> Observation:
if 'jupyter' in self.plugins: