Isolation and sandboxes
Where a node runs and where its code runs: workers in the service process or in their own thread, expressions in a separate JavaScript context, code nodes in their own context or process.
Node workers run inside the orchestrator process: the Link Loom SDK’s default isolation (process). Each step gets a
new worker instance that only sees the context it receives (ctx), never another step’s memory, and is removed when
the step ends. The SDK also has a threaded mode (one worker thread and V8 heap per worker), but workflow nodes do not
use it: in that mode the worker’s result does not travel back to the engine.
Expressions are evaluated apart from the worker’s own code: each node resolves its {{ }} values in a separate
JavaScript context (a vm context of its own), with only the variables and helpers of the
expression API, no require, process, network or timers, and 100 ms per expression. The
code nodes also run their program in a context of their own: code.js in a separate vm context with its own time
limit, code.python in a separate process (see Code nodes).
Summary
| What runs | Where | Limit |
|---|---|---|
| The node’s worker | The orchestrator process, one new instance per step | The node’s own timeouts |
{{ }} expressions | A separate JavaScript (vm) context per node | 100 ms per expression |
code.js | A separate vm context (default) | Its timeout_ms, 5000 ms by default |
code.python | A separate Python process | Its own timeout |
What an expression can read and call is listed in the expression API reference, and what it cannot (Node APIs, network, timers) in JavaScript Globals.
Next steps
From draft to an immutable version, and which mode runs what.
Runs and their statusesThe statuses of a run and of its result.
How a node runsEach node is a Link Loom worker: spawn, activate, stop.
Worker state machineSeven states, nine events and the hook each transition runs.
When a node failsError port or crash, and how each one ends the run.