Skip to main content
GET
Wait for Command
Blocks until the background process identified by pid completes, then returns the full CommandResult. The process is removed from the tracked list after this call returns. If the PID is not found in the tracked process list, the endpoint returns a CommandResult with exit_code: 1 and a "process not found" message in stderr.

Path Parameters

string
required
The sandbox identifier. Format: sbx-<8 chars>.
integer
required
Process ID of the background command to wait for.Example: 42

Response

string
Full standard output produced by the command.
string
Full standard error output. Contains "process not found" if the PID is not tracked.
integer
Exit code returned by the process. 0 indicates success. 1 when the process was not found.

Example

Response

Error Responses