exec_async#
- async SandboxRuntime.exec_async(instance_id: str, command: str | List[str], timeout: float | None = None, cwd: str | None = None, env: Dict[str, str] | None = None) ExecResult[source]#
Execute a command inside the specified sandbox asynchronously.
- Parameters:
instance_id (str) – Unique identifier of the sandbox instance.
command (str | List[str]) – Command to execute, either as a string or a list of arguments.
timeout (float | None) – Maximum execution time in seconds.
cwd (str | None) – Working directory inside the sandbox for command execution.
env (Dict[str, str] | None) – Environment variables to set for the command.
- Returns:
ExecResult containing exit code, stdout, and stderr.
- Return type: