Code Node (& Function Node)
The Code Node runs JavaScript in a secure code sandbox, including async/await. No network, no timers, no modules.
Written By Philippe
Last updated 3 days ago
Code Node (& Function Node)
⚠️ Limitations — Works with known restrictions, see details below
Compatibility
On indie.money, the Code node runs in a secure code sandbox instead of Node.js:
Limits:
- Secure code sandbox CPU limit (5 seconds to 5 minutes) — Heavy computation has its own compute limit, from a 5-second floor up to 5 minutes depending on the workflow's price per run. The limit is for the whole run: all Code steps in a run share it. Waiting on APIs, LLMs, or webhooks does not count against it. This limit is time spent running code inside the secure code sandbox; since code there has no network or timers to wait on, awaiting cannot idle against the limit. Network waits in HTTP Request, LLM, and database nodes use the workflow execution limits below instead.
- "Step … reached this run's … compute limit" — the run used up its compute time. The message names the step and the run price that gives more time. Raise the run price, or move heavy work out of the Code node. At the highest tier, split the work across more runs.
- 5-minute wall-clock timeout — total elapsed time including I/O wait. Awaiting does not consume the CPU budget by idling — with no network or timers in the sandbox, there is nothing to wait on.
- Memory 16 MB — Code that uses more stops on that node with "This step ran out of memory." Keep less data in memory at one time.
- Recursion depth about 1,100 calls — Deeper recursion stops with
stack overflow. - Results keep plain data —
undefined,NaN,Infinityand empty array slots come back asnull, and aSetorMapcomes back as{}. Return an array or an object instead.
Status
This integration works on indie.money with known limitations. See the details above for specifics.