quick-window-91705
07/26/2025, 7:19 PMnarrow-agent-26548
07/26/2025, 7:19 PMnarrow-agent-26548
07/26/2025, 7:26 PMAgentRuntimeTimeoutError was not being properly propagated to the evaluation loop.
Root Cause: The AgentRuntimeTimeoutError was falling through to generic exception handling in the agent controller because it wasn't included in the list of specifically handled exceptions, causing it to be wrapped in a generic RuntimeError and losing the original exception type information.
Fix Applied: Made minimal changes to `openhands/controller/agent_controller.py`:
1. Added AgentRuntimeError import
2. Added isinstance(e, AgentRuntimeError) to the list of specifically handled exceptions
3. Fixed type annotation for mypy compliance
Result: Now when AgentRuntimeTimeoutError occurs, it gets properly stored in state.last_error with its original exception name (e.g., "AgentRuntimeTimeoutError: Runtime failed to return..."), allowing the evaluation system's is_fatal_evaluation_error() and is_fatal_runtime_error() functions to correctly detect it as a fatal error and stop the evaluation as intended.
The changes have been committed and are ready for use. The fix ensures that timeout errors will no longer cause evaluations to continue running indefinitely when they should stop.