← Back to PRs

#9321: [Swarm] [Bug]: `cron.add` tool call always fails with empt

by swarmagents open 2026-02-05 03:54 View on GitHub →
stale
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