Skip to content

fix: soft error when AI agent reaches max iterations#8366

Draft
centdix wants to merge 2 commits intomainfrom
soft-error-max-iterations
Draft

fix: soft error when AI agent reaches max iterations#8366
centdix wants to merge 2 commits intomainfrom
soft-error-max-iterations

Conversation

@centdix
Copy link
Collaborator

@centdix centdix commented Mar 13, 2026

Summary

  • When the AI agent reaches max iterations with pending tool calls, append an error message to the conversation messages instead of returning a hard error
  • This allows the job to complete successfully with partial results rather than failing entirely

Test plan

  • Run an AI agent flow with a low max_iterations value and tools that always request more calls
  • Verify the job completes with the error message in the output messages instead of failing
  • Verify normal agent flows (that complete before max iterations) are unaffected

🤖 Generated with Claude Code

centdix and others added 2 commits March 13, 2026 12:10
…error

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link

Deploying windmill with  Cloudflare Pages  Cloudflare Pages

Latest commit: 035eecc
Status: ✅  Deploy successful!
Preview URL: https://957cf86f.windmill.pages.dev
Branch Preview URL: https://soft-error-max-iterations.windmill.pages.dev

View logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant