Processes
List process records, optionally filtered by state, kind, session, name, or pid.
state?stringrunning, terminal, or all (the default when omitted).
kind?stringFilter by process kind.
"exec""pty""code"sessionId?stringFilter by session id.
name?stringFilter by live name alias.
pid?integerFilter by OS process id.
int32application/json- response
GET /processes response body.
items*array<>Matching processes in creation order.
curl -X GET 'http://sandbox:2280/processes'{ "items": [ { "argv": [ "string" ], "code": "string", "createdAt": "string", "cwd": "string", "exitCode": 0, "exitedAt": "string", "id": "string", "keepLogs": "until_cleanup", "kind": "exec", "language": "string", "login": true, "name": "string", "pid": 0, "reason": null, "resolvedShell": "string", "sessionId": "string", "shell": "string", "shellCommand": "string", "signal": "string", "startedAt": "string", "state": "starting", "stdin": "closed", "system": true, "terminal": null, "timeoutMs": 0, "user": "string", "firstAvailableCursor": "string", "lastCursor": "string", "logs": null, "truncatedHead": true } ]}Create a process record and launch exec, pty, or code work. waitMs keeps the request open until terminal or timeout; logs=text|base64 adds the first log page and therefore requires waitMs.
waitMs?integerWait up to this many milliseconds before replying; timing out still returns 201 with a running record.
int640 <= valuelogs?stringInline the first logs page using text or base64; requires waitMs.
application/json- body
POST /processes request body.
argv?array<string>|argv mode. Exactly one of argv, shellCommand, or code may be present.
code?|Code to execute through a language-kernel session.
cwd?|Optional working directory. Empty falls back to the configured default OS user's home for exec/pty processes that run as that user and whose home exists; kind=code, an explicit per-request user, and a missing home fall back to the daemon work dir.
env?Environment overrides applied at spawn time.
keepLogs?null|kind?null|language?|Code language such as python, typescript, or javascript.
login?booleanWhether to request a login shell.
name?|Optional live-only alias. Must be a safe identifier.
sessionId?|Optional owning session id.
shell?|Requested shell path or shell name.
shellCommand?|Shell-command mode. The daemon writes this to a script file before execution.
stdin?null|terminal?null|timeoutMs?|Per-process timeout in milliseconds.
int640 <= valueuser?|Optional user to run as. Rejected with 400 UNSUPPORTED_OPERATION for kind=code (the language kernel does not run as a sandbox user in v1).
Created process record. When waitMs and logs are requested, the response includes the inline logs page.
application/json- response
The process DTO returned by create/get/list.
argv?array<string>|argv create shape, omitted unless this process was created that way.
code?|Code source, omitted unless this is a kind=code process.
createdAt*stringRFC 3339 creation timestamp.
cwd*stringWorking directory the daemon used.
exitCode?|Exit code, omitted until terminal.
int32exitedAt?|RFC 3339 exit timestamp, omitted until terminal.
id*stringStable process id.
keepLogs*KeepLogsRecord/log retention policy.
"until_cleanup""on_exit_ttl""none"kind*KindProcess kind.
"exec""pty""code"language?|Code language, omitted when not applicable.
login?booleanWhether the daemon requested a login shell.
name?|Optional live-only alias, omitted when unnamed.
pid?|OS process id while running, omitted before spawn and after exit.
int32reason?null|resolvedShell?|Resolved shell path or name, omitted until resolution has happened.
sessionId?|Owning session id, omitted for standalone processes.
shell?|Requested shell, omitted when the daemon used its default resolution.
shellCommand?|Shell command source, omitted unless this process was created that way.
signal?|Signal name, omitted when none applies.
startedAt?|RFC 3339 process-start timestamp, omitted until the process starts.
state*StateLifecycle state.
"starting""provisioning""running""terminal"stdin*StdinModeWhether stdin is open.
"closed""open"system?booleanWhether this is a protected daemon-owned system process.
terminal?null|timeoutMs?|Process timeout in milliseconds, omitted when unset.
int640 <= valueuser?|Requested user, omitted when the daemon runs as its default user.
firstAvailableCursor?|Cursor of the first surviving log frame, omitted when nothing was evicted.
lastCursor?|Cursor of the last known log frame, omitted until at least one frame exists.
logs?null|truncatedHead*booleanWhether retention evicted the head of the ledger.
curl -X POST 'http://sandbox:2280/processes' \ -H 'Content-Type: application/json' \ -d '{}'{ "argv": [ "string" ], "code": "string", "createdAt": "string", "cwd": "string", "exitCode": 0, "exitedAt": "string", "id": "string", "keepLogs": "until_cleanup", "kind": "exec", "language": "string", "login": true, "name": "string", "pid": 0, "reason": null, "resolvedShell": "string", "sessionId": "string", "shell": "string", "shellCommand": "string", "signal": "string", "startedAt": "string", "state": "starting", "stdin": "closed", "system": true, "terminal": null, "timeoutMs": 0, "user": "string", "firstAvailableCursor": "string", "lastCursor": "string", "logs": null, "truncatedHead": true}Fetch a process by stable id or by its live alias.
id*stringProcess id or live alias.
application/json- response
The process DTO returned by create/get/list.
argv?array<string>|argv create shape, omitted unless this process was created that way.
code?|Code source, omitted unless this is a kind=code process.
createdAt*stringRFC 3339 creation timestamp.
cwd*stringWorking directory the daemon used.
exitCode?|Exit code, omitted until terminal.
int32exitedAt?|RFC 3339 exit timestamp, omitted until terminal.
id*stringStable process id.
keepLogs*KeepLogsRecord/log retention policy.
"until_cleanup""on_exit_ttl""none"kind*KindProcess kind.
"exec""pty""code"language?|Code language, omitted when not applicable.
login?booleanWhether the daemon requested a login shell.
name?|Optional live-only alias, omitted when unnamed.
pid?|OS process id while running, omitted before spawn and after exit.
int32reason?null|resolvedShell?|Resolved shell path or name, omitted until resolution has happened.
sessionId?|Owning session id, omitted for standalone processes.
shell?|Requested shell, omitted when the daemon used its default resolution.
shellCommand?|Shell command source, omitted unless this process was created that way.
signal?|Signal name, omitted when none applies.
startedAt?|RFC 3339 process-start timestamp, omitted until the process starts.
state*StateLifecycle state.
"starting""provisioning""running""terminal"stdin*StdinModeWhether stdin is open.
"closed""open"system?booleanWhether this is a protected daemon-owned system process.
terminal?null|timeoutMs?|Process timeout in milliseconds, omitted when unset.
int640 <= valueuser?|Requested user, omitted when the daemon runs as its default user.
firstAvailableCursor?|Cursor of the first surviving log frame, omitted when nothing was evicted.
lastCursor?|Cursor of the last known log frame, omitted until at least one frame exists.
logs?null|truncatedHead*booleanWhether retention evicted the head of the ledger.
curl -X GET 'http://sandbox:2280/processes/string'{ "argv": [ "string" ], "code": "string", "createdAt": "string", "cwd": "string", "exitCode": 0, "exitedAt": "string", "id": "string", "keepLogs": "until_cleanup", "kind": "exec", "language": "string", "login": true, "name": "string", "pid": 0, "reason": null, "resolvedShell": "string", "sessionId": "string", "shell": "string", "shellCommand": "string", "signal": "string", "startedAt": "string", "state": "starting", "stdin": "closed", "system": true, "terminal": null, "timeoutMs": 0, "user": "string", "firstAvailableCursor": "string", "lastCursor": "string", "logs": null, "truncatedHead": true}Delete a process record and purge its logs. System processes stay protected.
id*stringProcess id or live alias.
Process record deleted.
curl -X DELETE 'http://sandbox:2280/processes/string'Upgrades to a websocket that streams live output frames and accepts stdin bytes. When cursor is set, the daemon replays ledger bytes up to the attach-time tail first. Invalid or expired replay cursors are reported as websocket policy closes (1008), not HTTP errors.
id*stringProcess id or live alias.
cursor?stringOptional logs cursor to replay before switching to live websocket output.
Websocket upgrade accepted.
curl -X GET 'http://sandbox:2280/processes/string/attach'Returns a JSON page by default, or an SSE stream when follow=true. SSE event names are log, state, warning, error, and eof; Last-Event-ID resumes from the last seen cursor.
id*stringProcess id or live alias.
cursor?stringResume after this cursor. Empty or omitted starts from the beginning.
limit?integerPage size for JSON reads; clamped by the daemon.
0 <= valueencoding?stringPayload encoding: text (default) or base64.
follow?booleanWhen true, answer an SSE follow stream instead of a JSON page.
Last-Event-ID?|Optional resume cursor for SSE reconnects; wins over the cursor query parameter.
SSE stream when follow=true: log carries LogFrameDto, state carries ProcessStateEventDto, warning carries ProcessWarningEventDto, error carries ProcessErrorEventDto, and eof carries ProcessEofEventDto.
text/event-streamcurl -X GET 'http://sandbox:2280/processes/string/logs'Change the terminal size of a PTY process.
id*stringProcess id or live alias.
application/json- body
POST /processes/{id}/resize body.
cols*integerPTY columns; must be at least 1.
int321 <= valuerows*integerPTY rows; must be at least 1.
int321 <= valuePTY resized.
curl -X POST 'http://sandbox:2280/processes/string/resize' \ -H 'Content-Type: application/json' \ -d '{ "cols": 1, "rows": 1}'Send a signal, optionally with escalation, or interrupt a running code execution.
id*stringProcess id or live alias.
application/json- body
POST /processes/{id}/signals body.
escalateAfterMs?|Grace period in milliseconds before escalating. Maximum 600000.
int640 <= valueescalateTo?|Escalation signal name. Defaults to SIGKILL when omitted.
signal?stringSignal name such as SIGTERM, SIGKILL, or SIGINT. Empty means SIGTERM.
Signal accepted.
curl -X POST 'http://sandbox:2280/processes/string/signals' \ -H 'Content-Type: application/json' \ -d '{}'Write stdin data and optionally close stdin.
id*stringProcess id or live alias.
application/json- body
POST /processes/{id}/stdin body.
data?stringData to write. Text by default, or base64url when encoding=base64.
encoding?|Optional payload encoding: text (default) or base64.
eof?booleanWhether this request also closes stdin after writing.
stdin written.
curl -X POST 'http://sandbox:2280/processes/string/stdin' \ -H 'Content-Type: application/json' \ -d '{}'Long-poll for the terminal result. Omitted timeoutMs keeps the daemon's default 60-second chunk, timeoutMs=0 waits until terminal, and any positive value is honored uncapped. Timing out returns reason: timed_out without killing the process.
id*stringProcess id or live alias.
timeoutMs?integerLong-poll timeout in milliseconds. Omitted means the daemon's default 60-second chunk; 0 means wait until terminal; any positive value is honored uncapped.
int640 <= valueapplication/json- response
Terminal result returned by GET /processes/{id}/wait and SSE state events.
exitCode?|Process exit code, when the platform has one.
int32reason?null|signal?|Signal name such as SIGKILL, omitted when none applies.
curl -X GET 'http://sandbox:2280/processes/string/wait'{ "exitCode": 0, "reason": null, "signal": "string"}