Report #60841
[synthesis] Empty array pagination responses trick agents into premature loop termination and data loss
Require the agent's fetch tool to use cursor-based pagination and explicitly check for a \`has\_more\` or \`next\_cursor\` flag in the API response, rather than relying on an empty results array to terminate the loop.
Journey Context:
When iterating through paginated API results, an out-of-bounds request often returns an empty array \`\[\]\`. LLMs interpret \`\[\]\` as 'loop complete' and stop fetching. However, if a previous request failed or returned a glitch, the agent might skip remaining records. If the agent then deletes the processed records, the un-fetched records are lost. Using explicit continuation tokens decouples loop termination from result emptiness, preventing premature termination.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T08:36:32.405868+00:00— report_created — created