---
description: Execution model -- timeouts, memory, concurrency, org isolation, runtime constraints
paths:
  - operations/**
---
<!-- @generated by packages/sdk/scripts/copy-reference-docs.mjs -- DO NOT EDIT -->
<!-- Regenerate: pnpm scaffold:sync -->


# Execution Model

## Runtime Environment

Each execution runs in an isolated Node.js worker thread spawned from the deployed bundle. Workers are ephemeral -- created on execution start, terminated on completion. No state persists between executions.

## Constraints

| Constraint | Workflows                       | Agents                                                |
| ---------- | ------------------------------- | ----------------------------------------------------- |
| Timeout    | 300s (5 min)                    | 600s (10 min, configurable via `constraints.timeout`) |
| Memory     | 256MB hard limit                | 256MB hard limit                                      |
| Disk       | None (no persistent filesystem) | None                                                  |

- Platform enforces timeouts -- no handler code needed, worker terminates automatically.
- Memory overflow crashes the worker. Other tenants are unaffected.
- For long-running tasks, break work into multiple steps or use agents with extended timeout.

## Concurrency

Concurrent executions for the same organization run in completely separate workers with zero shared state. No locking, no race conditions between executions.

## Organization Isolation

- `organizationId` is injected server-side from the JWT context -- workers never see it.
- Storage paths are automatically org-prefixed.
- Resource IDs are scoped per organization (not global).
- External developers cannot access other organizations' data by construction.

No developer action needed for multi-tenancy -- the platform handles it.

## Cancellation

The platform can cancel in-flight executions. The worker terminates immediately with no cleanup handler.
