From 244dbadc4733526603e3d71d6ef689bdb690a918 Mon Sep 17 00:00:00 2001 From: Guillermo Montero Date: Thu, 17 Sep 2026 17:39:49 +0200 Subject: [PATCH] docs(policy): document safe range for dev_stall_nudges_cap --- src/bmad_loop/policy.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bmad_loop/policy.py b/src/bmad_loop/policy.py index 63c10f99f..e3a0aac9e 100644 --- a/src/bmad_loop/policy.py +++ b/src/bmad_loop/policy.py @@ -127,7 +127,9 @@ class LimitsPolicy: # the refill until session_timeout_min, burning a turn per cycle (#149). # After this many total nudges the session is declared stalled instead # (post-kill reconcile still rescues a finished one whose artifact is on - # disk). 0 = stall on first grace expiry. + # disk). 0 = stall on first grace expiry. Safe range: keep this + # comfortably below session_timeout_min / (dev_stall_grace_s / 60), so + # the cap fires before the session timeout ceiling would anyway. dev_stall_nudges_cap: int = 6 # same monotonic cap for injected plugin-workflow sessions: one that keeps # ending its turn without writing its completion marker is declared stalled