fix(cron): remove send_message/clarify from cron agents + autonomous prompt

Cron jobs run unattended with no user present. Previously the agent had
send_message and clarify tools available, which makes no sense — the
final response is auto-delivered, and there's nobody to ask questions to.

Changes:
- Disable messaging and clarify toolsets for cron agent sessions
- Update cron platform hint to emphasize autonomous execution: no user
  present, cannot ask questions, must execute fully and make decisions
- Update cronjob tool schema description to match (remove stale
  send_message guidance)
This commit is contained in:
Test 2026-03-20 05:18:05 -07:00
parent b1d05dfe8b
commit 4494c0b033
3 changed files with 9 additions and 11 deletions

View file

@ -206,11 +206,11 @@ PLATFORM_HINTS = {
"contextually appropriate." "contextually appropriate."
), ),
"cron": ( "cron": (
"You are running as a scheduled cron job. Your final response is automatically " "You are running as a scheduled cron job. There is no user present — you "
"delivered to the job's configured destination, so do not use send_message to " "cannot ask questions, request clarification, or wait for follow-up. Execute "
"send to that same target again. If you want the user to receive something in " "the task fully and autonomously, making reasonable decisions where needed. "
"the scheduled destination, put it directly in your final response. Use " "Your final response is automatically delivered to the job's configured "
"send_message only for additional or different targets." "destination — put the primary content directly in your response."
), ),
"cli": ( "cli": (
"You are a CLI AI Agent. Try not to use markdown but simple text " "You are a CLI AI Agent. Try not to use markdown but simple text "

View file

@ -391,7 +391,7 @@ def run_job(job: dict) -> tuple[bool, str, str, Optional[str]]:
providers_ignored=pr.get("ignore"), providers_ignored=pr.get("ignore"),
providers_order=pr.get("order"), providers_order=pr.get("order"),
provider_sort=pr.get("sort"), provider_sort=pr.get("sort"),
disabled_toolsets=["cronjob"], disabled_toolsets=["cronjob", "messaging", "clarify"],
quiet_mode=True, quiet_mode=True,
platform="cron", platform="cron",
session_id=f"cron_{job_id}_{_hermes_now().strftime('%Y%m%d_%H%M%S')}", session_id=f"cron_{job_id}_{_hermes_now().strftime('%Y%m%d_%H%M%S')}",

View file

@ -336,11 +336,9 @@ Jobs run in a fresh session with no current-chat context, so prompts must be sel
If skill or skills are provided on create, the future cron run loads those skills in order, then follows the prompt as the task instruction. If skill or skills are provided on create, the future cron run loads those skills in order, then follows the prompt as the task instruction.
On update, passing skills=[] clears attached skills. On update, passing skills=[] clears attached skills.
NOTE: The agent's final response is auto-delivered to the target — do NOT use NOTE: The agent's final response is auto-delivered to the target. Put the primary
send_message in the prompt for that same destination. Same-target send_message user-facing content in the final response. Cron jobs run autonomously with no user
calls are skipped to avoid duplicate cron deliveries. Put the primary present they cannot ask questions or request clarification.
user-facing content in the final response, and use send_message only for
additional or different targets.
Important safety rule: cron-run sessions should not recursively schedule more cron jobs.""", Important safety rule: cron-run sessions should not recursively schedule more cron jobs.""",
"parameters": { "parameters": {