Skip to content

πŸ™Œ OpenHands: AI-Driven Development

fix: Properly handle AgentRuntimeTimeoutError in runtime base (#9923)

Xingyao Wang18557e8654c4
diff --git a/openhands/runtime/base.py b/openhands/runtime/base.py
index 9296a5bee1..601ced85a7 100644
--- a/openhands/runtime/base.py
+++ b/openhands/runtime/base.py
@@ -351,14 +351,14 @@ class Runtime(FileEditRuntimeMixin):
error_message = f'{type(e).__name__}: {str(e)}'
self.log('error', f'Unexpected error while running action: {error_message}')
self.log('error', f'Problematic action: {str(event)}')
- self.set_runtime_status(runtime_status, error_message)
+ self.set_runtime_status(runtime_status, error_message, level='error')
return
except Exception as e:
runtime_status = RuntimeStatus.ERROR
error_message = f'{type(e).__name__}: {str(e)}'
self.log('error', f'Unexpected error while running action: {error_message}')
self.log('error', f'Problematic action: {str(event)}')
- self.set_runtime_status(runtime_status, error_message)
+ self.set_runtime_status(runtime_status, error_message, level='error')
return
observation._cause = event.id # type: ignore[attr-defined]