From b5eca456ab35e7b3d46fca6afa7493b94c816b6b Mon Sep 17 00:00:00 2001 From: Jiang Bohan Date: Fri, 6 Feb 2026 15:31:29 +0800 Subject: [PATCH] fix(cron): clarify agent-turn can use all tools in description The model was confused about payload capabilities. Explicitly state that agent-turn spawns an isolated agent with ALL tools (exec, write, web_fetch, etc.) and add usage guidance for choosing between system-event and agent-turn. Co-Authored-By: Claude Opus 4.6 --- src/agent/tools/cron/cron-tool.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/agent/tools/cron/cron-tool.ts b/src/agent/tools/cron/cron-tool.ts index a8d97e85..1fd7d70a 100644 --- a/src/agent/tools/cron/cron-tool.ts +++ b/src/agent/tools/cron/cron-tool.ts @@ -157,11 +157,14 @@ SCHEDULE TYPES (schedule.kind): { "kind": "cron", "expr": "0 9 * * *", "tz": "Asia/Shanghai" } PAYLOAD TYPES (payload.kind): -- "system-event": Injects text as system event into session +- "system-event": Injects text into main session (like a reminder, triggers main agent to respond) { "kind": "system-event", "text": "" } -- "agent-turn": Runs agent with message (isolated sessions only) +- "agent-turn": Spawns an isolated agent that can use ALL tools (exec, write, web_fetch, etc.) to autonomously complete a task { "kind": "agent-turn", "message": "", "timeoutSeconds": 300 } +USE "agent-turn" when the job needs to perform actions (run commands, write files, fetch data, etc.). +USE "system-event" when the job only needs to remind/notify the user in the current chat. + CRITICAL CONSTRAINTS: - sessionTarget="main" REQUIRES payload.kind="system-event" - sessionTarget="isolated" REQUIRES payload.kind="agent-turn"