Run Submit
run_submitSubmit code for background execution and get a run ID immediately, so you can poll for results later instead of keeping the call open.
Instructions
Submit code for BACKGROUND execution; returns a run_id immediately. Use this, not execute_code/execute_code_stream/session_run, when you do not want to hold the call open — poll run_inspect(run_id), and run_cancel(run_id) to stop it early.
Same request shape as execute_code minus session_id (a run is a
standalone process, not a session workspace). timeout bounds the WORK
itself, not how long you wait to collect it.
This call's own reply carries no output — a small run_id handle — so
the anthropic/maxResultSizeChars hint lives on run_inspect instead,
which returns the full envelope, same shape execute_code returns,
once the run lands.
Admission is capped (CODECALC_MAX_ACTIVE_RUNS, default 64): past that many runs still running/cancelling at once, this returns a resource_exhausted error rather than growing without bound — call run_inspect/run_cancel to make room, or wait for one to finish.
Retention: see run_inspect.
dependencies: same semantics as execute_code's own. A refusal is
returned directly with no run created. Otherwise this call still
returns immediately: the install itself runs on the background worker,
ahead of the code, and a failed install becomes the run's own terminal
error — readable via run_inspect(run_id) like any other outcome.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Source code to run in `language` | |
| stdin | No | Text piped to the program's standard input; empty means no input | |
| no_net | No | Block outbound network access for this run; best-effort on platforms without seccomp | |
| max_cpu | No | Per-call CPU-time ceiling in seconds; 0 means no explicit limit is set | |
| timeout | No | Wall-clock seconds before the run is killed; clamped to a 120s ceiling, same as execute_code | |
| language | Yes | Runtime to execute in, e.g. 'python3', 'node'; see list_languages for the full catalog | |
| provider | No | Execution backend id to use (see list_execution_providers); default picks automatically | |
| dependencies | No | Packages to install before running, e.g. ['requests==2.31.0']; merged with any PEP 723 block | |
| max_memory_mb | No | Per-call memory ceiling in MiB; 0 means no explicit limit is set | |
| max_output_kb | No | Stdout/stderr capture cap in KiB per stream; 0 uses the 64 KiB default, hard-clamped to 240 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||