Skip to main content
POST
Run a command in a session's sandbox

Authorizations

Authorization
string
header
required

API key with the vk_ prefix. Create one from the dashboard.

Path Parameters

session_id
string
required

Session ID

Body

application/json

Unknown fields are refused (422): the runtime's operator-only switches (root, harness_env) are not part of this API, and a body naming them must fail loudly rather than run as the agent user without saying so.

argv
string[]
required

The command and its arguments (no shell: use ["sh", "-c", "..."] for pipes). 1..=256 entries.

cwd
string | null

Working directory, /workspace (default) or a path under it.

env
object

Extra environment variables, on top of the session's own (what the agent sees, model credentials excluded). ANTHROPIC_*, OPENAI_*, VERI_*, PATH and LD_* are dropped (listed in env_dropped).

timeout_s
integer<int32> | null

Seconds before the command is killed, 1..=300 (default 60).

Required range: x >= 0

Response

The command ran (any exit code)

object
string
required
exit_code
integer<int64>
required
stdout
string
required

At most 64 KiB (truncated when cut).

stderr
string
required

At most 16 KiB (truncated when cut).

truncated
boolean
required
timed_out
boolean
required

The command ran past timeout_s and was killed.

duration_ms
integer<int64>
required
env_dropped
string[]
required

env keys that were dropped (reserved names).