watchdog: hourly orchestrator wake fires even during a limit window

Operator request: the hourly supervision prompt should land regardless of
limit state, as a fallback that keeps things on track if the limit-state
machinery ever breaks. If the limit is genuinely still in force the wake is
harmless (the banner just re-prints and limit_tick re-arms); once it lifts,
the queued wake doubles as a resume nudge.
This commit is contained in:
autonomic-bot
2026-06-11 01:00:29 +00:00
parent d6e1a704da
commit 2e1ab8d384

View File

@ -588,7 +588,10 @@ def wake_orchestrator():
if not session_alive(ORCH_SESSION):
return False
if _load_limit_state(ORCH_SESSION) is not None:
return False # in a usage-limit window — defer the wake until the limit clears
# Deliberately wake anyway: the hourly prompt doubles as a fallback that keeps
# the orchestrator on track even if the limit-state machinery breaks. If the
# limit is genuinely still in force the wake is harmless (banner re-prints).
log(f"orchestrator ({ORCH_SESSION}) is in a limit window — sending hourly wake anyway (fallback)")
if ACTIVE_RE.search(capture_pane(ORCH_SESSION, 25)):
return False # busy — don't interrupt; retry when idle
try: