From 89f6721cfaff036013d02c81fd8947e9bb8bd863 Mon Sep 17 00:00:00 2001 From: cabana8471 Date: Fri, 30 Jan 2026 21:47:11 +0100 Subject: [PATCH] fix: use clamp_retry_delay() for reset-time delays Use the shared clamp_retry_delay() function (1-hour cap) for parsed reset-time delays instead of a separate 24-hour cap. This aligns with the PR's consistent 1-hour maximum delay objective. Co-Authored-By: Claude Opus 4.5 --- agent.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/agent.py b/agent.py index 6688bcf..9bd2c3b 100644 --- a/agent.py +++ b/agent.py @@ -325,9 +325,7 @@ async def run_autonomous_agent( target += timedelta(days=1) delta = target - now - delay_seconds = int(min( - delta.total_seconds(), 24 * 60 * 60 - )) # Clamp to 24 hours max + delay_seconds = clamp_retry_delay(int(delta.total_seconds())) target_time_str = target.strftime("%B %d, %Y at %I:%M %p %Z") except Exception as e: