Limits

The emulator enforces the same limits as Google Cloud Workflows.

Execution limits

LimitValueError on exceed
Assignments per assign step50ResourceLimitError
Conditions per switch step50ResourceLimitError
Call stack depth (subworkflow nesting)20RecursionError
Steps per execution100,000ResourceLimitError
Expression length400 charactersValidation error

Parallel execution limits

LimitValueError on exceed
Branches per parallel step10ResourceLimitError
Max concurrent branches/iterations20ResourceLimitError
Parallel nesting depth2ParallelNestingError
Unhandled exceptions per execution (continueAll)100--

Size limits

LimitValue
Workflow source code128 KB
Variable memory (all variables, arguments, events)512 KB
Maximum string length256 KB
HTTP response size2 MB
Execution argument size32 KB

HTTP limits

LimitValue
HTTP request timeout1800 seconds (30 minutes)
Execution duration1 year

What happens when a limit is exceeded

  • Assignment/switch/branch limits: Deployment or validation error before execution starts
  • Call stack depth: RecursionError at runtime when depth 20 is exceeded
  • Step count: ResourceLimitError after 100,000 steps in a single execution
  • Parallel nesting: ParallelNestingError when nesting depth exceeds 2
  • Memory/size limits: ResourceLimitError when variable memory or result size exceeds the cap
  • HTTP timeout: TimeoutError when a request exceeds the configured timeout

Tips for staying within limits

  • Assign unused variables to null to free memory
  • Only store essential portions of large API responses
  • Use list.concat() judiciously in parallel for loops (each call copies the list)
  • Break large workflows into subworkflows for readability, but watch the call stack depth
  • Use concurrency_limit in parallel steps to control resource usage