From 53e3c14f1d936a9f2c8eae1c8a754edcea2a14e1 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Mon, 31 Aug 2026 08:25:24 -0700 Subject: [PATCH] fix: clamp invalid effective_timeout to the 120s wait default instead of unbounded (review follow-up for #94305) --- tools/environments/base.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/environments/base.py b/tools/environments/base.py index 561fca5f8e..c4acd34402 100644 --- a/tools/environments/base.py +++ b/tools/environments/base.py @@ -1556,7 +1556,10 @@ class BaseEnvironment(ABC): try: bound_s = float(effective_timeout) + _EXECUTE_WAIT_BOUND_GRACE_S except (TypeError, ValueError): - bound_s = None + # Defensive: a non-numeric timeout must not silently disable the + # backstop (that would recreate the unbounded wait this bound + # exists to prevent). Fall back to the module's 120s wait default. + bound_s = 120.0 + _EXECUTE_WAIT_BOUND_GRACE_S try: bounded = run_bounded_sync(