currentIndex Drops to null After 12 Successful Cycles

Describe what happens (in detail):
We have an AI Agent that processes rows from a CSV (product catalog) and loops through each product to check for MAP (Minimum Advertised Price) violations.

  • The app runs correctly through cycles 0 → 12.

  • At each cycle up to 12:

    • currentIndex increments properly (0 → 1 → … → 12).

    • A valid currentProduct object is retrieved from the dataset.

    • Violations are appended as expected.

  • At cycle 13:

    • currentProduct is still valid (example: “Electric Marine Grade 2300W (BH032MG-2300)” with mapPrice: 3390).

    • But the Increment Index block fails to persist currentIndex.

    • Logs show the block executed, but functionStdout was empty and currentIndex dropped to null.

    • This caused the loop to crash even though the product data was intact.

This pattern is 100% reproducible: the workflow works perfectly until cycle 12, then consistently fails at cycle 13.

Intended behavior:

  • currentIndex should increment deterministically on every cycle (n → n+1) until currentIndex >= totalProducts.

  • The loop should continue seamlessly through all rows in the CSV (in our case, 30+ rows).

  • At no point should currentIndex reset or become null.

Evidence from logs (attached):

  • Cycle 12:

    currentIndex = 12
    currentProduct = { "productName": "56 Double Element Smart Electric Heater", "mapPrice": 659, "actualPrice": 619.02 }
    ✅ Violation logged
    
    
  • Cycle 13:

    currentProduct = { "productName": "Electric Marine Grade 2300W (BH032MG-2300)", "mapPrice": 3390 }
    currentIndex = null   (Increment block ran but functionStdout empty)
    ❌ Workflow crashed
    
    

Why this points to a platform bug (not user code):

  • The increment code is trivial (currentIndex + 1). There is no code path that assigns null.

  • The same block executed correctly for 12 cycles, then suddenly failed with valid input.

  • The CSV data is valid and continuous — no gaps at row 13.

  • Therefore, the failure is in MindStudio’s variable persistence across loop transitions.

AI Agent link: https://app.mindstudio.ai/agents/copy-of-map-guardian-ver-22-2195898e/run

Run log JSON (showing cycles 0–13 with breakdown):

This is not an error in MindStudio. Your workflow reached the maximum number of steps it is allowed to execute in a single run. You can increase this limit by clicking the agent’s name, selecting “Advanced” and increasing the “Maximum Operations per Invocation” setting.

Thanks for the clarification Sean.