The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(cron): say the MCP zero-tools preflight block clears itself when the server reconnects
teknium1fad867648d84
diff --git a/cron/scheduler_preflight.py b/cron/scheduler_preflight.pyindex e33ef14b29c..df5dd1dd091 100644--- a/cron/scheduler_preflight.py+++ b/cron/scheduler_preflight.py@@ -329,10 +329,18 @@ def _empty_requested_mcp_toolsets(job: dict, cfg: dict) -> Optional[str]:if name in enabled_mcp_server_names(cfg) and not resolve_toolset(name)]if not missing:return None+ # The reason is what the operator reads in the gateway log and the alert. It must say the+ # block is not sticky: a server that is merely unreachable for a minute (router reboot, DNS+ # blip) is parked and self-probed by the MCP layer, and this check re-runs on every dispatch,+ # so the job resumes on its own — two operators misread the old text as a config error to+ # repair by hand (#112871).return (f"MCP server(s) {', '.join(sorted(missing))} named in this job's enabled_toolsets ""resolved to zero tools for this profile (not connected, or connected for another "- "profile only). Fix the server or remove it from the job's toolsets.")+ "profile only). If the server is only temporarily unreachable this clears by itself — "+ "the check re-runs on every dispatch and the job resumes once the server reconnects. "+ "If the name is wrong or belongs to another profile, fix the server or remove it from "+ "the job's toolsets.")def _preflight_job_config(job: dict, cfg: dict) -> Optional[str]:diff --git a/tests/cron/test_cron_mcp_toolset_empty_block.py b/tests/cron/test_cron_mcp_toolset_empty_block.pyindex 36332ded1ee..40f67c5da77 100644--- a/tests/cron/test_cron_mcp_toolset_empty_block.py+++ b/tests/cron/test_cron_mcp_toolset_empty_block.py@@ -75,6 +75,9 @@ def test_requested_mcp_server_owned_by_other_profile_blocks_run(tmp_path):assert agent_built is Falseassert success is Falseassert error is not None and "[blocked_config]" in error and "notion" in error+ # The reason is operator-facing copy: it must say the block re-evaluates itself so a+ # transient outage is not mistaken for a config error to repair by hand (#112871).+ assert "clears by itself" in errordef test_requested_mcp_server_with_tools_runs(tmp_path):