Reference

Limits And Recovery

Canonical runtime and payload limits for public flow authoring, plus recovery actions for common limit failures.

Quick Answer

Design flows to stay within hard limits, and prefer templates/persistence/chunking before raising payload size in runtime paths.

Core Flow Limits

LimitValueNotes
Max flow payload size150 KBDefinition map only; excludes template/function bodies.
Max steps per flow50Total declared steps in a flow.
Max flow/call-flow nesting depth5Child-flow nesting guardrail.
Max templates total size1 MBAggregate template content budget.
Max functions total size1 MBAggregate function content budget.
Effective package budget~2.1 MBCombined payload + templates + functions.

Runtime Limits Per Run

LimitValueNotes
Max step executions10000Per run execution ceiling.
Max HTTP requests50Per run, across HTTP steps.
Max tracked LLM tokens per run (platform-managed keys)100000Accounting limit for platform-managed keys.
Platform-managed :max-tokens clamp per LLM call10000Applied only for platform-managed keys.
User-provided LLM keys :max-tokens clampNot clamped by platformProvider/account limits still apply.
Max workflow duration30 daysHard run duration cap.
Max child flow invocations25flow/call-flow invocations per run.

Wait And Approval Limits

LimitValueNotes
Default wait timeout24hApplies when timeout is omitted.
Max wait timeout30 daysHard cap for wait duration.
Checkpoint timeout default24hReview checkpoint timeout can be set up to 30 days.

Polling Limits (flow/poll)

Limit / RuleValueNotes
Max poll timeout1hHard timeout ceiling for flow/poll.
Max poll attempts100Hard attempt ceiling for flow/poll.
Required boundAt least one of :timeout or :max-attemptsUnbounded polling is rejected.
Required condition + backoff validation:return-on requiredBackoff shape is validated (for example :linear requires :step).

Step Result And Persistence Limits

LimitValueNotes
Inline result threshold256 KBResults above this should usually use :persist.
Max step result size1 MBHard per-step output cap.
DB result max bytes1 MBCap for database step result payload bytes.
DB result max rows5000Cap for row count returned by DB steps.
Code step input max1 MBHard cap on :function step :input.
Notify payload max1 MBHard cap for notify payload body.
Authoring recommendationPrefer :persist for unknown/growing outputsMany real flows exceed 256 KB quickly.

Webhook And Ref Loading Limits

LimitValueNotes
Webhook payload max50 MBGeneral webhook body size ceiling.
Signed multipart webhook payload max5 MBApplies to signed multipart uploads.
Raw MIME webhook payload max50 MBRaw MIME ingestion ceiling.
Ref load into LLM content100 KBRef content cap when injected into LLM fields.
Ref load into code step1 MBRef content cap for code step loading.
Ref load into HTTP body10 MB retained / 20 MB ephemeral tierTier-dependent HTTP body ref loading limit.
Persist write cap50 MB retained / 4 GB ephemeral tierTier-dependent blob persistence write limit.

Config Warning Thresholds

ThresholdBehaviorRecommendation
~1 KB per step payloadNon-blocking warning starts around this sizeMove large literals into templates.

Failure Recovery Patterns

When you hit size/limit validation errors, apply these patterns first:

Validation errorFirst recovery actions
Flow payload too largeMove large inline content into :templates and :functions.
Replace large literals in :flow with template/function refs.
Result too large / Query result too large / DB row limit exceededPaginate (LIMIT, cursor loops).
Aggregate/filter in database first.
Persist artifacts and pass refs instead of full payloads.
Blob reference too large for ...Reduce blob size before loading it into a step.
For user downloads, return signed links instead of loading full content into flow memory.
Code step :input too largePass compact subsets into code steps.
Move heavy processing to data layer or external compute.
Orchestrate in smaller batches.
Wait timeout exceeds maximumUse shorter waits and multi-stage waits.
Branch timeout outcomes explicitly (:fail or :continue).
flow/poll timeout exceeds limit / flow/poll max attempts exceededReduce timeout and use staged polling (fast first poll, slower secondary poll).
Increase interval and use explicit backoff.
Prefer webhook/wait-signal patterns when callbacks are supported.

Recommended Authoring Checklist

Checklist itemWhy
Add :persist when output size is uncertainPrevents inline payload overflow as data grows.
Use templates for large request/prompt/SQL bodiesKeeps flow payload size stable and reviewable.
Keep waits bounded and keyedAvoids unbounded waits and ambiguous resume paths.
Design webhook auth explicitly (:auth {:type ...})Prevents insecure/default webhook exposure.
Test largest expected payload paths, not just tiny happy-path samplesCatches real-world limit failures before production.

Related

As of Mar 24, 2026