Run from the Console
Select the intended Machine and open Command. Confirm the Machine is running and account eligibility is active. Enter a short command, such as:Linux in the output. The Console deliberately executes entered shell text through a shell. If you need several related shell actions, combine them in the same submitted command:
Run through the SDK
Install the SDK from npm and provide the configured control URL, trusted caller key and intended Computer ID. This complete example prints a deterministic value without modifying the Guest:Deepest ready, exit code zero, timed_out: false and output_truncated: false. The SDK returns the complete envelope; it does not turn nonzero process exits into automatic retries.
For a Sandbox, select the Sandbox by ID and use deepest.sandbox(id).exec(...) with the same request shape. Check the Sandbox’s expiry and idle policy first.
Executable and arguments are separate
The public API does not implicitly interpret shell operators. This request executes a program with arguments:5. A string such as "cd /work && npm test" is not an executable name.
If shell syntax is actually needed, request a shell explicitly:
Interpret two layers of result
A completed command with exit code 1 is still an observed command result. For example, a test failure is not a network failure. A truncated output may hide diagnostics; do not report a complete transcript. A known timeout does not prove that the command made no changes before timing out.
Exec success is
no-retry because the command may have effects. Even a seemingly harmless command can invoke network services or write files.
Concurrency and retries
Computer Exec, Sandbox Exec, Tools installation/inspection and Desktop setup share the account’s command capacity. Opening more Machines does not multiply this capacity.EXEC_BUSY uses HTTP 429 and retry: "safe": the request was refused before command dispatch. Wait at least error.retry_after_seconds (the same value as HTTP Retry-After) and explicitly retry the still-needed command. Do not invent a global “requests per minute” quota from this concurrency response.
For UNKNOWN / query-first, preserve the command, target ID and relevant task context. Query the original Machine and then inspect the specific intended effect. If a request was supposed to create a file, read that file; if it submitted a third-party action, use that system’s read-only status check. A Machine being running does not resolve the command outcome.
There is no public durable Exec ID or command-status endpoint. Do not poll an invented jobs.get() or replay a mutation until its effect is known.
Long-running work
For a Computer job that needs to outlive a single HTTP request, manage the process inside Linux through SSH and an appropriate installed session/process manager. Deepest does not automatically turn Exec into a durable job. Here is a small, user-managed background job with separate output and a completion record. Run this inside the Computer through SSH. It creates a fresh directory rather than overwriting a project. Confirm that the standardnohup utility and Python are available:
0, an empty stderr.log, and Verified sum: 5000050000. The launcher PID is diagnostic information, not a durable platform job ID or proof of success. If the completion file is absent or the exit code is nonzero, inspect the logs and the specific intended effect before another submission. Do not assume that a disappeared process never ran.
For your own build or script, replace the example task with the authorized workload and use that workload’s output checks. Keep credentials out of command arguments and logs. This pattern does not restart work after Stop or preserve RAM execution state; stronger supervision is a separate Linux configuration you own.
Ordinary control-service reconnects may interrupt access without stopping the Guest workload. Stop, however, ends Guest processes. Starting again is a cold boot; only services configured to start on boot restart under their own Linux configuration.
A foreground Sandbox Exec prevents idle cleanup during that execution and refreshes activity, but it never extends the fixed 24-hour lifetime. A detached background process alone does not refresh Sandbox idle activity.
Troubleshoot and finish
When finished, retain required files and explicitly Stop an otherwise unused Machine. Stopping frees running Memory but not Storage. For exact schemas and error codes, use API Reference, errors and reliability.