Command execution

When DataMind Oda runs a command on your computer, one part of the app starts the program, decides what it sees of your settings, and keeps what comes back. This page covers that behaviour, the same machinery behind every command Oda runs for itself: chat commands, the language tools it starts, and the helper agents it delegates work to. Commands you type in your own terminal are not these commands; that shell is yours.

How a command starts

Before the program runs, Oda also selects how the command's process will be contained, so that it can be stopped and cleaned up later; Process containment and cleanup covers that side. What a command may change is a separate layer, the chat's access mode and approvals, covered in Command sandboxing and approvals.

What a command sees of your environment

Each command starts from a cleaned copy of the environment:

Oda can also add variables to a command on purpose, including forwarding one that would normally be removed, or drop an inherited variable, without touching the rest of the environment.

Streams and the control pipe

Output caps and spill files

How a large result is opened from the chat is in Large results and spill files.

How a command ends

What happens to a command's processes, including when Oda itself quits, is in Process containment and cleanup.

Proxy settings for commands

When a command will not start on Windows

Questions, answered

Does Oda run my command through a shell?

No. The program and its arguments run exactly as named, and shell text is not interpreted for you. When a shell step is needed, the shell itself is named as the program.

Why was my command refused before it started?

The start request was incomplete or the program could not be resolved: a missing program name, a relative path, or a file that cannot be run. Oda reports which one, and nothing runs.

Can a command read my credentials from the environment?

The obvious carriers do not reach it: variable names containing KEY, PASSWORD, SECRET or TOKEN, and the variables Oda manages for itself, are removed. The filter reads names, so a secret kept in an unrelated name is not covered.

Where does a long command's full output go?

Oda keeps the end of the output in the result and marks it truncated. When a stream has a spill cap, the full stream is also written to a private file, and Oda does not delete completed spill files by itself. See Large results and spill files.

Why did a read of the output come back lossy?

The read started before the part that is still retained. Once output slides out of the kept window, a read from an older position cannot return it, so Oda returns what is left and says the read is lossy.

What does spawn <program> UNKNOWN (Windows error <number>) mean?

A program could not start on Windows and the system's failure has no known short code. The number and any text after it carry the system's own reason, for example a policy that blocks the program.

What does [diagnostic truncated] mean?

A failure diagnostic was longer than its cap and was cut; the marker shows where the kept text ends.

Why does a result carry a signal instead of an exit code?

The command was ended by a signal rather than exiting on its own. Oda reports the signal in place of an exit code, and adds no separate timeout or cancellation label.

What happens if a command expects the control channel?

A program built to use the channel opens it on the reserved descriptor; the marker that sets it up cannot be supplied from outside. A program that expects the channel but is not given it fails with subprocess control channel was not inherited.