Interface SandboxExecutionResult

Outcome of a single sandbox execution attempt.

interface SandboxExecutionResult {
    success: boolean;
    output?: unknown;
    error?: string;
    executionTimeMs: number;
    memoryUsedBytes: number;
}

Properties

success: boolean

true when run() resolved without throwing and within resource limits.

output?: unknown

The resolved return value of run(), present only when success is true.

error?: string

Human-readable error description, present when success is false. Includes timeout, memory-exceeded, and thrown-exception cases.

executionTimeMs: number

Actual wall-clock execution time in milliseconds. Populated regardless of success/failure.

memoryUsedBytes: number

Peak heap memory used by the sandbox process in bytes. Populated when the runtime can measure it; otherwise 0.