Skip to content

workflow: per-activity maxIterations override for the LLM turn loop - #71

Open
localrivet wants to merge 1 commit into
mainfrom
workflow-activity-max-iterations
Open

workflow: per-activity maxIterations override for the LLM turn loop#71
localrivet wants to merge 1 commit into
mainfrom
workflow-activity-max-iterations

Conversation

@localrivet

Copy link
Copy Markdown
Contributor

The LLM turn loop in run_llm_loop caps at a hard-coded MAX_ITERATIONS: u32 = 50. A write-enabled resolve activity (search + gated write + log per row) legitimately exceeds that on a hard chunk — observed live on the Vivid order-intake workflow: one 6-row chunk consumed 47 turns, and the run died with activity resolve-and-record exceeded max iterations after 3 of 8 chunks.

This reads params.maxIterations on the activity — the same param shape the graph loop node already accepts in graph.rs — and falls back to the existing default of 50 when absent. One pathway, one param name, no behavior change for workflows that don't set it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Npaqwqvb9Cnvz8tDqMGnzy

The turn budget in run_llm_loop was a hard-coded 50. A write-enabled
resolve activity doing search + gated write + log per row legitimately
exceeds that on a hard chunk (observed live: 47 turns for one 6-row
chunk on the Vivid order-intake workflow, run d7a921b2's predecessor
failing at 'exceeded max iterations' after 3 of 8 chunks).

Read params.maxIterations on the activity — the exact shape the graph
loop node already accepts (graph.rs) — falling back to the existing 50.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Npaqwqvb9Cnvz8tDqMGnzy
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