Skip to main content

Overview

Every session has resource limits to ensure fair usage and prevent abuse. Understanding these limits helps you build efficient applications and avoid errors.

Memory Limits

PlanMemory Per Session
Free1 GB
Paid4 GB
EnterpriseCustom
When exceeded:
{
  "error": {
    "code": "memory_limit_exceeded",
    "message": "Session exceeded 1GB memory limit"
  }
}

CPU Limits

PlanvCPU Per Session
Free0.25 cores
Paid1 core
EnterpriseCustom
CPU is shared and may be throttled under sustained high usage.

Execution Timeouts

PlanDefaultMaximum
Free30s30s
Paid30s300s (5min)
EnterpriseCustomCustom
Configure per execution:
await client.execute({
  sessionId: session.id,
  code: '...',
  timeout: 60 // seconds
});

Disk Space

PlanStorage Per Session
Free1 GB
Paid5 GB
EnterpriseCustom
Monitor usage:
await client.execute({
  sessionId: session.id,
  code: `
    const result = Bun.spawnSync(['du', '-sh', '/workspace']);
    console.log(result.stdout.toString());
  `
});

Concurrent Sessions

PlanMax Concurrent
Free10
Paid100
EnterpriseCustom

Request Rate Limits

PlanRequests/Minute
Free100
Paid1,000
EnterpriseCustom
Rate limit headers:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1640000000

File Limits

ResourceFreePaidEnterprise
Max file size10 MB50 MBCustom
Files per request1001,000Custom
Total filesUnlimitedUnlimitedUnlimited

Best Practices

Monitor usage

Check execution metrics to optimize resource usage

Set timeouts

Use appropriate timeouts for different operations

Clean up files

Delete unused files to stay within disk limits

Optimize code

Efficient code uses fewer resources