Limits and ConstantsEvery bound the system enforces, with its constant name and literal value.

Every number the runtime enforces, in one place. Names are the actual constants; look them up rather than hard-coding the values.

Model-facing bounds

Constant

Value

What it bounds

MAX_MODEL_TOOL_RESULT_BYTES

8 KiB

The text of a single tool result as the model sees it (~2k tokens). Applied live and again on replay

MAX_TOOL_RESULT_BYTES

256 KiB

The stored/structural tool result cap; over it, output is truncated with a marker

SPACE_INDEX_BUDGET_BYTES

2 KiB

The <space> index in every system prompt (Tools)

MAX_PROMPT_BYTES

64 KiB

An agent's system prompt

MAX_MESSAGE_TEXT_BYTES

64 KiB

One user message

MAX_CONTEXT_LINES / MAX_CONTEXT_LINE_BYTES

64 / 2 KiB

Client window context

Delegation and continuation

Constant

Value

What it bounds

MAX_SESSION_SPAWN_DEPTH

3

How deep delegation may nest

MAX_SESSION_SPAWNS_PER_SESSION

10

Children one session may spawn

MAX_RETURN_RESULT_RETRIES

3

Typed-result validation retries before the child gives up

MAX_RUN_CONTINUATIONS

3

Obligation asks before an honest ending

AGENT_RUN_MAX_ATTEMPTS

3

Attempts for a background run (an interactive turn gets 1 — retrying would hold the session lock)

The run queue

Constant

Value

What it bounds

LEASE_MS

60 s

How long a claimed run lease lasts

RETRY_BASE_MS

5 s

Exponential backoff base

RETRY_CAP_MS

5 min

Backoff ceiling

maxConcurrentModelRuns

8

Concurrent agent runs

maxConcurrentWorkflows

32

Concurrent script runs

pollIntervalMs

1 s

Dispatch fallback poll

Backoff is min(RETRY_BASE_MS × 2^(attempt−1), RETRY_CAP_MS) plus jitter. Retryability is classified, not assumed: a 5xx from a provider is retryable, a 4xx is a config error and is not.

Scripts and execution

Constant

Value

What it bounds

WORKFLOW_SOURCE_MAX_BYTES

256 KiB

Script source

DEFAULT_FUEL_MS

2 s

Compute between awaits before fuel-exhausted

DEFAULT_MEMORY_BYTES

64 MiB

QuickJS heap

DEFAULT_TIMER_PARK_THRESHOLD_MS

60 s

Sleeps at or above this park; shorter ones hold the VM

WORKFLOW_JOURNAL_MAX_ENTRIES

5,000

Journal entries per run

WORKFLOW_JOURNAL_MAX_BYTES

8 MiB

Journal bytes per run

MAX_EXEC_TIMEOUT_SECS

300

Ceiling on a requested execute timeout (default 60)

MAX_EXEC_OUTPUT_BYTES

64 KiB

stdout and stderr, each

TRIGGER_CHAIN_MAX_HOPS

8

Trigger chain depth before it is called a loop

Sandboxes default to 1 vCPU and 512 MiB, and the sandbox's own lifetime is the requested timeout plus 30 seconds of grace.

Content and storage

Constant

Value

What it bounds

MAX_WRITE_CONTENT_BYTES

256 KiB

Content in one write

MAX_LINK_RESOLUTION_CHECKS

50

hm:// links resolved per write (4 at a time)

MAX_MEMORY_PATH_BYTES / MAX_MEMORY_PATH_DEPTH

512 B / 16

Memory paths — note there is no size quota on memory itself

MEMORY_DOWNLOAD_IDLE_TIMEOUT_MS

60 s

Idle (not total) timeout on a download

MAX_SESSION_ATTACHMENT_BYTES

100 MiB

One attachment

MAX_SESSION_ATTACHMENTS

200

Attachments per session

MAX_MESSAGE_ATTACHMENTS

16

Attachments referenced by one message

MAX_INLINE_IMAGE_BYTES

~4.5 MB

Image shown inline to a vision model

MAX_UPLOAD_CHUNK_BYTES / MAX_UPLOAD_TOTAL_BYTES

8 MiB / 2 GiB

Chunked upload

UPLOAD_TTL_MS / MAX_ACTIVE_UPLOADS_PER_ACCOUNT

1 hour / 8

Upload sessions

Definitions and secrets

Constant

Value

MAX_NAME_BYTES

256

MAX_MODEL_BYTES

256

MAX_TOOL_COUNT

32

MAX_TOOL_NAME_BYTES

128

MAX_TOOLS_TOTAL_BYTES

4 KiB

MAX_METADATA_CBOR_BYTES

16 KiB

MAX_SECRET_BYTES

64 KiB

SECRET_NONCE_BYTES

12

Tool document source / description

256 KiB / 16 KiB

Tool name pattern

^[a-z][a-z0-9_-]{1,63}$

Protocol and paging

Constant

Value

MAX_ACTION_CLOCK_SKEW_MS

30 s (also the replay window — see Security)

HM_READ_TIMEOUT_MS

30 s

DEFAULT_SESSION_PAGE_SIZE / MAX_SESSION_PAGE_SIZE

50 / 200

HTTP request body

unbounded, deliberately

Do you like what you are reading? Subscribe to receive updates.

Unsubscribe anytime