Inconsistent hydration of global variables – campaigns visible in Debugger but missing in Live Run

To file a bug ticket, please follow the steps below:

  1. Describe what happens in as many details as possible.
  2. Describe the intended behavior.
  3. Share a link to AI Agent where this bug occurs
  4. Attach any screenshots/screen recordings to help us replicate and run tests on our end

Hi team,

I’m encountering a consistent issue with global variable hydration that appears to be a platform bug.

What I’m seeing:

  • When running the agent in Debugger mode, the global variable global.campaigns is populated correctly and rendered in my React interface.

  • When running the same agent in a real execution (Live Run), the UI does not receive / render global.campaigns, resulting in an empty campaigns list.

Important notes:

  • The React code already handles delayed hydration and retries (polling + refresh button).

  • The same useTemplateVariables() hook returns the expected data in Debugger, but not in Live Run.

  • This is reproducible and happens across multiple runs.

  • No code changes between Debugger and Live execution.

  • The issue appears to be environment-related, not UI logic.

Expected behavior:
If global.campaigns is available in Debugger, it should also be available in Live Run for the same flow execution.

Actual behavior:
global.campaigns is missing / undefined in Live Run, causing the UI to show no campaigns.

I’ve attached a screenshot showing the campaigns rendering correctly in Debugger mode.

This blocks production usage, since the UI behaves differently between Debugger and real execution.

https://app.mindstudio.ai/share/debugger/10cefb54-cac2-4b0a-ae4d-5dfd20055f78/61903091-1406-4e83-bfde-0fa82c6229db

Happy to provide:

  • Flow IDs

  • Logs

  • Minimal reproduction agent

  • Screen recording if needed

Thanks in advance,
Shay

This should be fixed now. Global variables are technically prefixed strings, not objects. For example, there is a variable called global.myVar and global.anotherVar, as opposed to an object called global with those properties as keys (like global = { myVar: ‘someValue’, anotherVar: ‘bar’ }.

So the correct way to access global variables looks like vars[‘global.myVar’], not vars.global.myVar.

However, this is not always intuitive - so for read-only blocks like Generate Asset, it has been updated to include both the default prefixed strings as well as a global and user object so you can access properties using dot notation. Note that this shortcut does NOT apply to custom functions. In custom functions, you would still need to access global variables like vars[‘global.variableName’].

1 Like

Thanks Sean! :raising_hands: Great work and a great platform as always.
Building the Smart Follow Outreach Agent really pushed my limits and forced me to go deep. exactly the kind of challenge that shows how powerful MindStudio can be.
Much appreciated :fire: