execute_code
Execute code snippets in a sandboxed environment, capturing stdout, stderr, exit codes, and resource usage with configurable limits.
Instructions
Execute code in language in a sandbox.
Returns stdout, stderr, exit_code, duration_ms, cpu_ms, peak_memory_kb, verdict (OK/TLE/MLE/OLE/RTE).
session_id: run inside a session workspace (see session_start); with a stateful session (python3/node) interpreter state persists across calls.max_memory_mb/max_cpu: per-call resource ceilings.max_output_kb: raise/lower the stdout cap (default 64 KiB).no_net: block network egress (LD_PRELOAD shim; dynamic binaries only).compact: return only verdict + stdout, drop the heavy fields.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| stdin | No | ||
| no_net | No | ||
| compact | No | ||
| max_cpu | No | ||
| timeout | No | ||
| language | Yes | ||
| session_id | No | ||
| max_memory_mb | No | ||
| max_output_kb | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||