Skip to main content
An execution runs a Linux command on a Dedalus Machine, such as installing a package, running a script, or building an app. Start executions from the CLI or an SDK. Executions are asynchronous: creating one returns an execution_id before the command finishes. Use that ID to check its status, read its output, or cancel it. If the machine is sleeping, it wakes before the command starts. For an interactive terminal where you type commands as you work, use SSH.

Run a Linux command

The examples below require an existing machine. Use its machine_id wherever a machine ID is shown. To create one, see Create a machine. The following example runs echo "hello world" on the remote machine. Commands follow the argument-vector convention described in execve(2): the first item names the executable, and each remaining item is one argument. The CLI accepts a JSON array. SDKs use a list or array in your language. Arguments are passed directly to the executable. To use shell features such as &&, pipes, or variable expansion, invoke a shell explicitly. For example, ["sh", "-c", "echo hello world && ls -la"] runs both commands on the machine.
Save the returned execution_id and use it in the following requests. Assign it to EXECUTION_ID in the CLI, execution_id in Python, or executionId in TypeScript and Go. Receiving an ID means the execution was created. Check its status to find out whether the command succeeded.

Check whether the command finished

Retrieve the execution using the ID returned when you created it. Repeat this request until the status is succeeded, failed, cancelled, or expired. These are terminal states, meaning the execution has finished. When retry_after_ms is present, wait at least that many milliseconds before checking again.
Active states are wake_in_progress, queued, and running. Terminal states are succeeded, failed, cancelled, and expired.

Read output

Once the command finishes, read its standard output (stdout) and standard error (stderr). For the echo example, stdout contains hello world. If the command failed, inspect its exit code, error details, and stderr. The output response also includes total byte counts and truncation flags. Each inline stream is capped at 64 KiB.

Execution options

Use these options when creating an execution from the CLI or an SDK. The following example passes text to cat, which copies standard input to standard output. It sets the working directory, an environment variable, and a one-minute timeout.
See the CLI guide for CLI setup and usage. Run dedalus machines executions create --help for the available flags, or use the SDK documentation for your language.

Read execution events

Events provide an ordered log of lifecycle changes and stdout or stderr chunks. Results are cursor-paginated.

List executions

List executions on a machine, newest first. Results are cursor-paginated.
Pass cursor from a prior response’s next_cursor to fetch the next page. Use limit to set the page size.

Cancel an execution

Delete an execution to cancel it. Deleting an execution that has already reached a terminal state is a no-op.
Last modified on September 9, 2026