The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(cron): degraded marker uses the redacted job name
kshitijk4poor15a3691404e5
diff --git a/cron/scheduler_delivery.py b/cron/scheduler_delivery.pyindex 0fa5b80ac31..76d76f833e4 100644--- a/cron/scheduler_delivery.py+++ b/cron/scheduler_delivery.py@@ -847,13 +847,14 @@ def _deliver_to_bot_chat(job: dict, content: str, profile: str, *, deferred: Opt# fail-closed scrub as the chat message and the session mirror. Rebind ``content`` itself so# the durable deferred record below also carries the scrubbed copy, not the raw output.content = _redact_cron_payload(content, "bot-chat payload")+ job_name = _redact_cron_payload(job.get("name", job_id), "job name")if (deferred or {}).get("degraded"):# A drained degraded-delivery marker already carries its own bracketed framing# (built in the timeout path below); wrapping it again would post two headers.message = contentelse:message = (- f'[Cronjob "{_redact_cron_payload(job.get("name", job_id), "job name")}" output — '+ f'[Cronjob "{job_name}" output — 'f"scheduled job, not the user. Review it, act on anything that needs action, and "f"summarize for the chat.]\n\n{content}")@@ -1001,7 +1002,7 @@ def _deliver_to_bot_chat(job: dict, content: str, profile: str, *, deferred: Optmarker_queued = Falseif not (deferred or {}).get("degraded"):marker = (- f"[Cronjob \"{job.get('name', job_id)}\" — DELIVERY DEGRADED, scheduled job, "+ f"[Cronjob \"{job_name}\" — DELIVERY DEGRADED, scheduled job, "f"not the user. This alert's bot-chat turn timed out after "f"{timeout_s}s, so the full output could NOT be posted "f"here. Read the complete saved output with `hermes cron runs` "