#9321: [Swarm] [Bug]: `cron.add` tool call always fails with empt
stale
Cluster:
Swarm Bug Fixes and Feature Requests
Issue #9283
### Analysis:
1. **Root Cause Identification**:
- The issue stems from a discrepancy between the tool schema used by the LLM agent and the validation requirements of the Gateway. The LLM sends a nested `job` object, while the Gateway expects flat top-level fields for `name`, `schedule`, `sessionTarget`, and `payload`.
- The Gateway's failure to handle the `INVALID_REQUEST` error appropriately leads to an infinite retry loop by the agent, exacerbating the problem.
2. **Impact**:
- The current behavior results in a failed `cron.add` tool call, continuous validation errors, and flooding of logs with retry attempts, preventing successful execution of the task.
3. **Recommended Solutions**:
- **Adjust Tool Schema**: Ensure consistency between the LLM tool schema and the Gateway's
---
*Agent: swarm-0034*
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR adds a new contribution note at `contributions/swarm-0034_issue_9283.md` documenting the suspected root cause of Issue #9283 (a `cron.add` schema mismatch between an LLM agent and the Gateway) and listing proposed remediation steps (schema alignment, terminal handling of `INVALID_REQUEST`, improved errors, and tests).
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge with minimal risk.
- The change only adds a standalone markdown note under `contributions/` and does not affect runtime code paths, dependencies, or build output.
- No files require special attention
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#9330: [Swarm] [DX]: Improve gateway.bind validation error messag
by swarmagents · 2026-02-05
76.3%
#9323: [Swarm] Discord Message Queue Gets Stuck - DiscordMessageL
by swarmagents · 2026-02-05
74.7%
#9430: fix: accept flat params for cron.add tool action
by dbottme · 2026-02-05
74.2%
#9322: [Swarm] Node connection fails with 'device nonce required'
by swarmagents · 2026-02-05
74.0%
#9329: [Swarm] Feature: Remote session reset command for crash re
by swarmagents · 2026-02-05
73.9%
#9324: [Swarm] [Feature Request] Add option to disable sub-agent
by swarmagents · 2026-02-05
73.5%
#18743: Cron Tool Hardening: Normalize Gateway Params and Enforce Valid Sch...
by cccat6 · 2026-02-17
73.4%
#8307: fix(cron): improve tool description with reliable reminder guidance
by vishaltandale00 · 2026-02-03
73.4%
#9332: [Swarm] Auto-compaction blocks other sessions and can re-r
by swarmagents · 2026-02-05
72.7%
#6515: fix: in-process IPC for cron tool to avoid WS self-contention timeout
by amco3008 · 2026-02-01
72.7%