Actions24
- Code Interpreter Actions
- Command Actions
- File Actions
- Sandbox Actions
- Snapshot Actions
Command → Run Background
AI-generatedSummary
Starts a shell command in the background inside an existing Declaw sandbox and returns the API response, which the operation description says includes the process PID, without waiting for the command to finish.
Inputs
- Sandbox ID (required) — ID of the existing sandbox to run the command in (e.g. sbx-a1b2c3d4).
- Command (required) — Shell command to execute inside the sandbox (e.g. python3 script.py).
- Additional Fields > Working Directory — Working directory for the command. Sent only if non-empty.
- Additional Fields > Timeout (Seconds) — Command timeout in seconds; decimals allowed, 0 means no timeout. Default 60. Sent only when set in Additional Fields.
- Additional Fields > User — Unix user to run the command as. Sent only if non-empty.
- Additional Fields > Environment Variables — Key/value pairs, converted to an env map and passed to the command.
Output shape
One output item per input item containing the JSON response from the Declaw API's POST /sandboxes/{id}/commands call with background=true.
The source doesn't show the response fields. The operation description says it returns the PID, which you can pass to Kill Process. With Continue On Fail enabled, a failed item yields {error: message}. The command's stdout and stderr are not collected.
Examples
Example 1: Start a long-running dev server in a sandbox and keep the workflow moving.
Sandbox ID = {{$json.sandbox_id}}, Command = 'npm start', Working Directory = /home/user/app, Timeout = 0, Env NODE_ENV=production.
Example 2: Launch a background worker as a specific user, then later kill it by PID.
Sandbox ID = sbx-a1b2c3d4, Command = 'python3 worker.py', User = user. Pass the returned PID to Command > Kill Process.