Sandbox limits
Scripts run in an isolated SES sandbox in a dedicated utility process:
- Timeout: each enabled script in a list gets its own limit (default 5000 ms). Configure Script timeout (ms) in Settings → General; set to
0to disable. A send with multiple scripts can use up to the sum of each script's limit. Eachawait hc.fetch(...),await hc.sleep(...),await hc.send(...),await hc.sendJSON(...),await hc.fs.*, orawait hc.livePage(...)(including page load waits) call counts toward the same script timeout. - Network: scripts cannot open arbitrary network connections. Outbound HTTP is available only through
await hc.fetch(...)when Allow script network requests is enabled in Settings → General. - Filesystem: scripts cannot open arbitrary paths. File I/O is available only through
await hc.fs.*when Allow script file read / Allow script file write are enabled. Paths are confined to the script file root (git repo directory for git-backed collections, otherwise the configured root or home directory). There is no Nodefsmodule or browser DOM. - Live page: scripts cannot open embedded browser tabs unless Allow script live page access is enabled. Use
await hc.livePage(...)when that setting is on — see hc.livePage and Live pages. - Language: modern JavaScript (scripts are transpiled with esbuild and evaluated as async functions). Top-level
awaitis supported. Relative snippet imports (import … from './snippet-name.js') are supported; bare npm package imports andrequireare not supported yet. - Globals: only
hc,console, and standard JavaScript globals are available
If a script throws or times out, the error is recorded and the send continues with the last known request state. Syntax errors and runtime exceptions surface in the send console.
