The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(cron): trim owner-adapter resolution comment to the why (#124248, salvage #116316)
teknium1e790ef4e3149
diff --git a/tools/cronjob_tools.py b/tools/cronjob_tools.pyindex 17e472af11f..e1595fab45d 100644--- a/tools/cronjob_tools.py+++ b/tools/cronjob_tools.py@@ -296,14 +296,10 @@ def _run_claimed_job(job: Dict[str, Any], extra_prompt: Optional[str] = None) -># task" and can break encrypted Matrix delivery (#61495 — salvaged from #63586 by @Fly-onlyone).runner = runner_ref() if callable(runner_ref) else Noneadapters = getattr(runner, "adapters", None) if runner is not None else None- # ``runner.adapters`` is the DEFAULT profile's map. Under ``gateway.multiplex_profiles`` a- # manual run fired from a secondary profile's agent executes with HERMES_HOME overridden to- # that profile's home, so delivering through ``runner.adapters`` sends the result out the- # default bot (a Telegram DM reaches the user from the wrong bot). Resolve the owner's map- # the same way notifications and goals do — fail closed, no fallback to the default bot.- # A runner without ``_adapters_for_profile`` (shims, tests) keeps ``runner.adapters``; a- # resolution failure is NOT a reason to fall back: it propagates to the ``except`` below,- # which marks the run failed and surfaces the error instead of misdelivering.+ # ``runner.adapters`` is the LAUNCH profile's map; under multiplex the run executes with+ # HERMES_HOME bound to the owning profile, so resolve that profile's adapters the way the+ # ticker (``tick_adapters_for``) does — fail closed, never the default bot (#124248). A+ # resolution error propagates to the ``except`` below and marks the run failed.if runner is not None and hasattr(runner, "_adapters_for_profile"):from hermes_constants import get_hermes_home, profile_name_for_home