Skip to main content
POST
Attach to an existing command

Authorizations

Authorization
string
header
required

A Cool Computers API key, user access token, or claimed agent access token in the Authorization header. Follow https://www.cool.computer/auth.md for agent registration and https://www.cool.computer/authentication.md for direct user credentials.

Path Parameters

id
string
required

Stable public computer identifier.

Minimum string length: 1
Example:

"cmp_123"

Body

application/json
execution_id
string
required

The exact existing execution identity bound to the target computer. Attaching never launches a command.

Pattern: ^cmp_[0-9a-f]{24}\.exec\.[0-9a-f]{32}$
after_id
integer

Replay only output and drop frames after this cursor. The last allocated cursor is valid and still returns the stored final result; a greater value fails with invalid_execution_cursor.

Required range: x >= 0

Response

Newline-delimited replay and one final result for the same execution identity.

type
enum<string>
required
Available options:
pid,
stdout,
stderr,
drop,
exit,
error
Allowed value: "pid"
status
enum<string>
required
Available options:
running,
succeeded,
failed,
cancelled,
owner_lost
Allowed value: "running"
execution_id
string
required
Pattern: ^cmp_[0-9a-f]{24}\.exec\.[0-9a-f]{32}$
pid
integer
required
Required range: x >= 1
id
integer

Monotonic replay cursor present only on stdout, stderr, and drop frames.

Required range: x >= 1
timestamp
string<date-time>
stdout
string
stderr
string
dropped_bytes
integer
Required range: x >= 0
dropped_frames
integer
Required range: x >= 0
exit_code
integer
signal
string
code
string
error
string