Skip to content

Protocol Limits & Bounds ​

To prevent unbounded memory growth and buffer overflow attacks, Cloud Harness MCP enforces deterministic bounds across all operations:

Resource Bounds ​

SurfaceLimitConfigurable Env Var
Max File Read Size256 KB (default 64 KB)files_read.limit
Max Command Exec Output1 MBexec_run and bash buffer
Max Artifact Size16 MBMAX_ARTIFACT_BYTES
Total Principal Artifacts128 MBMAX_PRINCIPAL_ARTIFACT_BYTES
Workspace Wall TTL900s (15 min)WORKSPACE_WALL_TTL_SECONDS
Workspace Idle TTL300s (5 min)WORKSPACE_IDLE_TTL_SECONDS
Recoverable Grace3600s (60 min)WORKSPACE_RECOVERABLE_GRACE_SECONDS
Active Workspaces3 per principalMAX_ACTIVE_WORKSPACES_PER_OWNER
Max File List Entries500 entries / pagefiles_list.limit
Max Active API Keys10 per identityHard bound
Managed Package Release Size512 MiB per releasePACKAGES_MAX_RELEASE_BYTES
Managed Package Storage4 GiB per ownerPACKAGES_MAX_OWNER_BYTES
Managed Package Bindings32 per ownerPACKAGES_MAX_BINDINGS
Managed Package Build Time600s per plan or applyPACKAGES_BUILD_TIMEOUT_MS
Managed Package Builds2 concurrent, plans expire after 30 minHard bound
Managed Package Plan Wait20s inline, then poll packages_status with the resolutionIdHard bound; keep REQUEST_TIMEOUT_MS above it
Skill Size (Skills over MCP, ZIP import)512 files and 16 MiB per skillHard bound
skills/list Page Size100 skills / pageHard bound
Skills over MCP Cache HintttlMs: 30000, cacheScope: privateHard bound

The workspace TTLs, recoverable grace, and active-workspace quota can also be overridden instance-wide in Dashboard → Settings, which takes precedence over the runner variable. TTL and grace changes apply only to workspaces opened afterwards.

Agent model budgets ​

Every agent_spawn model request goes through the Model Gateway. Before sending a request, the gateway reserves the worst case the request can cost from the agent's token and cost caps:

  • Input is reserved per request byte. Each image, audio, video, or file part also adds a fixed surcharge, because a small image can cost more tokens than its bytes.
  • Output is reserved at the output cap the gateway sends upstream. The cap is lowered to what the remaining cost budget can pay for. Reasoning tokens count as output.
  • When the response ends, the gateway charges the usage the provider reported, including cache reads, cache writes, reasoning, and long-context price tiers. It never charges less than a cost the provider reports. Unused reservation is refunded. A request that fails, is cancelled, or reports no usage is charged its full reservation.

A request that the remaining budget cannot cover is refused with 429 model_budget_exhausted. All figures are gateway estimates, not a provider invoice. The exact reservation rules, surcharge, and pricing are owned by apps/model-gateway/src/budget.ts.

Released under the MIT License. Single-owner private remote coding harness.