1 · Anti-recursion
If a workflow ends up calling itself (A → B → A), Floogos detects it at runtime and aborts with a clear message showing the chain that caused the cycle. No infinite descent.
The problem it solves. You’re building a flow and, while testing it, a Sub Workflow that calls itself (or a badly built iteration) enters an infinite loop. With no defenses, that execution never yields: it holds a worker slot forever and, with a few loops, the queue freezes. The safety net makes sure you never reach that point.
They act in layers: if one doesn’t reach, the next one cuts
1 · Anti-recursion
If a workflow ends up calling itself (A → B → A), Floogos detects it at runtime and aborts with a clear message showing the chain that caused the cycle. No infinite descent.
2 · Depth cap
Sub-workflow nesting is bounded (10 levels by default). Past that limit the execution stops with an explicit error instead of growing without control.
3 · Tree-wide cancellation
The Stop button now halts the children too. Cancelling the execution you see in the editor cuts the whole sub-workflow tree, not just the top level.
4 · Node budget
A count of executed nodes catches cyclic chains (a node pointing backwards) even when the clock hasn’t run out. Past the budget, the execution is marked failed.
5 · Execution deadline
Every execution has an effective time limit. On expiry the engine cuts cleanly between nodes and records the error for diagnosis.
6 · Worker watchdog
The final backstop: if a node never yields, the worker releases its slot on timeout. The queue keeps flowing even if one execution gets stuck — with no process restarts.
Three ways, from the simplest to the last-resort backstop
In the editor, during a run, the stop control cancels the whole tree. The engine cuts at the next safe point between nodes and marks the instance as cancelled.
Recursion, depth cap, node budget or deadline: any of the four aborts the run on its own, with no intervention, and leaves the reason in the trace.
If none of the above reaches (a node that won’t yield), the worker releases its slot on timeout. No need to touch the infrastructure: the queue never freezes.
All with a safe default; tuned via environment variables
| Setting | Default | What it controls |
|---|---|---|
SUBWORKFLOW_MAX_DEPTH | 10 | Maximum sub-workflow nesting levels. |
WORKFLOW_MAX_NODE_EXECUTIONS | 10000 | Node-execution budget per run (catches cycles). |
WORKFLOW_MAX_EXECUTION_SEC | — | Maximum execution time for all flows. 0 = no limit. |
WORKFLOW_DEFAULT_EXECUTION_SEC | 3600 | Default maximum time (1 hour) when nothing else is defined. |
WORKER_JOB_TIMEOUT_MS | 600000 | Hard worker timeout (releases the slot). |
DLQ_SKIP_MANUAL | false | When on, manual runs don’t retry on failure. |
The safety net is the backstop, not the plan. The best execution is the one that never runs away: learn to chain sub-workflows without creating cycles.
Sub Workflow best practices →