Direct Answer
Rolling back a Twilio Studio flow does not reset or clear variables for executions that are already running. An execution stays bound to the flow version that was published when it started, so a rollback changes the definition for new executions only. Flow-level variables keep their current values for the remainder of that in-flight run. If the interim version added a variable that the reverted version does not define, that variable remains available to the ongoing execution; the reverted flow definition does not strip execution-scoped state from runs that already hold it. Widget-level counters, timers, and similar markers also persist until the execution ends.
Confirmed vs Inferred Behavior
| Item |
Status |
Notes |
| Execution binds to flow version at start |
Confirmed |
Studio ties each run to the published version active when execution begins. |
| New executions after rollback use reverted definition |
Confirmed |
Rollback republishes the older version; subsequent runs start from it. |
| In-flight flow variables retain values after rollback |
Inferred |
Variables live in execution context, but Twilio's public docs do not explicitly guarantee retention across rollback. |
| Interim-only variables persist in ongoing runs |
Inferred |
Reverted definition does not erase variables already set in that execution. |
| Widget counters and timers survive rollback |
Inferred |
Execution-level markers persist until the run ends. |
Verification Steps for This Case
- Start a test execution on the current flow version and note the Execution SID.
- Set a flow variable and increment a widget counter inside that run.
- Publish or roll back to the previous flow version.
- Fetch the in-flight execution with the Studio REST API.
curl -u "$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN" \
"https://studio.twilio.com/v2/Flows/$FLOW_SID/Executions/$EXECUTION_SID"
- Inspect the execution context and confirm variables and counters still hold their pre-rollback values.
- Compare Studio execution logs before and after rollback for the same Execution SID.
- Start a new execution after rollback and confirm it does not expose interim-only variables absent from the reverted flow.
Missing Diagnostic Detail
Are you sharing state across executions through Twilio Functions, an external database, or another service? External state is not affected by Studio rollback and can become inconsistent if downstream logic depends on rolled-back flow variables. If yes, snapshot or migrate that state before rollback rather than relying on in-flight execution context.
Note: Because Twilio does not publish an explicit rollback state contract, verify this behavior in a non-production flow before applying it to production executions.