Record a task's diff
curl --request PUT \
--url https://api.runaether.dev/computers/{computerID}/tasks/{taskID}/diffs/{diffID} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"diff": {
"additions": 4503599627370495,
"base_branch": "<string>",
"base_ref": "<string>",
"deletions": 4503599627370495,
"files": [
{
"additions": 4503599627370495,
"deletions": 4503599627370495,
"display_path": "<string>",
"hunks": [
{
"header": "<string>",
"lines": [
{
"kind": "add",
"new_line": 4503599627370496,
"old_line": null,
"text": "<string>",
"no_trailing_newline": true
}
],
"new_count": 4503599627370495,
"new_start": 4503599627370495,
"old_count": 4503599627370495,
"old_start": 4503599627370495
}
],
"kind": "text",
"new_path": "<string>",
"old_path": "<string>",
"status": "<string>"
}
]
},
"observed_at": "2023-11-07T05:31:56Z",
"outcome": "recorded"
}
'import requests
url = "https://api.runaether.dev/computers/{computerID}/tasks/{taskID}/diffs/{diffID}"
payload = {
"diff": {
"additions": 4503599627370495,
"base_branch": "<string>",
"base_ref": "<string>",
"deletions": 4503599627370495,
"files": [
{
"additions": 4503599627370495,
"deletions": 4503599627370495,
"display_path": "<string>",
"hunks": [
{
"header": "<string>",
"lines": [
{
"kind": "add",
"new_line": 4503599627370496,
"old_line": None,
"text": "<string>",
"no_trailing_newline": True
}
],
"new_count": 4503599627370495,
"new_start": 4503599627370495,
"old_count": 4503599627370495,
"old_start": 4503599627370495
}
],
"kind": "text",
"new_path": "<string>",
"old_path": "<string>",
"status": "<string>"
}
]
},
"observed_at": "2023-11-07T05:31:56Z",
"outcome": "recorded"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
diff: {
additions: 4503599627370495,
base_branch: '<string>',
base_ref: '<string>',
deletions: 4503599627370495,
files: [
{
additions: 4503599627370495,
deletions: 4503599627370495,
display_path: '<string>',
hunks: [
{
header: '<string>',
lines: [
{
kind: 'add',
new_line: 4503599627370496,
old_line: null,
text: '<string>',
no_trailing_newline: true
}
],
new_count: 4503599627370495,
new_start: 4503599627370495,
old_count: 4503599627370495,
old_start: 4503599627370495
}
],
kind: 'text',
new_path: '<string>',
old_path: '<string>',
status: '<string>'
}
]
},
observed_at: '2023-11-07T05:31:56Z',
outcome: 'recorded'
})
};
fetch('https://api.runaether.dev/computers/{computerID}/tasks/{taskID}/diffs/{diffID}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.runaether.dev/computers/{computerID}/tasks/{taskID}/diffs/{diffID}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'diff' => [
'additions' => 4503599627370495,
'base_branch' => '<string>',
'base_ref' => '<string>',
'deletions' => 4503599627370495,
'files' => [
[
'additions' => 4503599627370495,
'deletions' => 4503599627370495,
'display_path' => '<string>',
'hunks' => [
[
'header' => '<string>',
'lines' => [
[
'kind' => 'add',
'new_line' => 4503599627370496,
'old_line' => null,
'text' => '<string>',
'no_trailing_newline' => true
]
],
'new_count' => 4503599627370495,
'new_start' => 4503599627370495,
'old_count' => 4503599627370495,
'old_start' => 4503599627370495
]
],
'kind' => 'text',
'new_path' => '<string>',
'old_path' => '<string>',
'status' => '<string>'
]
]
],
'observed_at' => '2023-11-07T05:31:56Z',
'outcome' => 'recorded'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.runaether.dev/computers/{computerID}/tasks/{taskID}/diffs/{diffID}"
payload := strings.NewReader("{\n \"diff\": {\n \"additions\": 4503599627370495,\n \"base_branch\": \"<string>\",\n \"base_ref\": \"<string>\",\n \"deletions\": 4503599627370495,\n \"files\": [\n {\n \"additions\": 4503599627370495,\n \"deletions\": 4503599627370495,\n \"display_path\": \"<string>\",\n \"hunks\": [\n {\n \"header\": \"<string>\",\n \"lines\": [\n {\n \"kind\": \"add\",\n \"new_line\": 4503599627370496,\n \"old_line\": null,\n \"text\": \"<string>\",\n \"no_trailing_newline\": true\n }\n ],\n \"new_count\": 4503599627370495,\n \"new_start\": 4503599627370495,\n \"old_count\": 4503599627370495,\n \"old_start\": 4503599627370495\n }\n ],\n \"kind\": \"text\",\n \"new_path\": \"<string>\",\n \"old_path\": \"<string>\",\n \"status\": \"<string>\"\n }\n ]\n },\n \"observed_at\": \"2023-11-07T05:31:56Z\",\n \"outcome\": \"recorded\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.runaether.dev/computers/{computerID}/tasks/{taskID}/diffs/{diffID}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"diff\": {\n \"additions\": 4503599627370495,\n \"base_branch\": \"<string>\",\n \"base_ref\": \"<string>\",\n \"deletions\": 4503599627370495,\n \"files\": [\n {\n \"additions\": 4503599627370495,\n \"deletions\": 4503599627370495,\n \"display_path\": \"<string>\",\n \"hunks\": [\n {\n \"header\": \"<string>\",\n \"lines\": [\n {\n \"kind\": \"add\",\n \"new_line\": 4503599627370496,\n \"old_line\": null,\n \"text\": \"<string>\",\n \"no_trailing_newline\": true\n }\n ],\n \"new_count\": 4503599627370495,\n \"new_start\": 4503599627370495,\n \"old_count\": 4503599627370495,\n \"old_start\": 4503599627370495\n }\n ],\n \"kind\": \"text\",\n \"new_path\": \"<string>\",\n \"old_path\": \"<string>\",\n \"status\": \"<string>\"\n }\n ]\n },\n \"observed_at\": \"2023-11-07T05:31:56Z\",\n \"outcome\": \"recorded\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runaether.dev/computers/{computerID}/tasks/{taskID}/diffs/{diffID}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"diff\": {\n \"additions\": 4503599627370495,\n \"base_branch\": \"<string>\",\n \"base_ref\": \"<string>\",\n \"deletions\": 4503599627370495,\n \"files\": [\n {\n \"additions\": 4503599627370495,\n \"deletions\": 4503599627370495,\n \"display_path\": \"<string>\",\n \"hunks\": [\n {\n \"header\": \"<string>\",\n \"lines\": [\n {\n \"kind\": \"add\",\n \"new_line\": 4503599627370496,\n \"old_line\": null,\n \"text\": \"<string>\",\n \"no_trailing_newline\": true\n }\n ],\n \"new_count\": 4503599627370495,\n \"new_start\": 4503599627370495,\n \"old_count\": 4503599627370495,\n \"old_start\": 4503599627370495\n }\n ],\n \"kind\": \"text\",\n \"new_path\": \"<string>\",\n \"old_path\": \"<string>\",\n \"status\": \"<string>\"\n }\n ]\n },\n \"observed_at\": \"2023-11-07T05:31:56Z\",\n \"outcome\": \"recorded\"\n}"
response = http.request(request)
puts response.read_body{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}Computers
Record a task's diff
Keeps what the caller's machine bridge recorded of a task's work tree when a turn of one of its chats ended, by the id the bridge made for the recording, answering 204: the task's newest diff, or beside it its newest failed recording.
Use this tool when you need to:
- Record a task's diff when a turn ends, in a session open in a terminal or one the bridge runs, without being asked
- Record that there is none, and why
Examples:
- PUT /computers/{computerID}/tasks/{taskID}/diffs/{diffID} {"outcome": "recorded", "observed_at": "2026-11-15T10:00:00Z", "diff": {"base_branch": "main", "base_ref": "…", "additions": 2, "deletions": 1, "files": [...]}}
- PUT /computers/{computerID}/tasks/{taskID}/diffs/{diffID} {"outcome": "failed", "observed_at": "2026-11-15T10:00:00Z", "reason": {"code": "base_branch_gone", "message": "…"}}
Hints:
- A task keeps one recorded diff, the newest by observed_at, and its newest failure beside it: a failure never replaces a diff, and a recording no newer than the task's own changes nothing, so a repeat is harmless.
- A file is text, with its hunks, or omitted with its reason: binary; too_large once the hunks before it pass the bound; withheld when its name is a credential file's or a line of a hunk, either side or context, holds a credential's token. Never send a withheld file's content.
- More files than a recording lists, or longer paths, is the failure too_many_files, never a cut list.
- The API writes the message of every reason code it knows.
- A task backed by no work tree on the caller's computer is refused with 404 not_found.
- Only the grant of the caller's coding agent's bridge calls it, the machine bridge on the computer: a session or an API key is refused with 403 credential_kind_not_admitted.
- The call presents the computer's own secret, which aether setup keeps on it, in the Aether-Computer-Secret header. A computer that has none is refused with 403 computer_needs_setup: update the aether CLI there and run aether setup. A call that presents no secret, or another, is refused with 403 computer_set_up_elsewhere.
PUT
/
computers
/
{computerID}
/
tasks
/
{taskID}
/
diffs
/
{diffID}
Record a task's diff
curl --request PUT \
--url https://api.runaether.dev/computers/{computerID}/tasks/{taskID}/diffs/{diffID} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"diff": {
"additions": 4503599627370495,
"base_branch": "<string>",
"base_ref": "<string>",
"deletions": 4503599627370495,
"files": [
{
"additions": 4503599627370495,
"deletions": 4503599627370495,
"display_path": "<string>",
"hunks": [
{
"header": "<string>",
"lines": [
{
"kind": "add",
"new_line": 4503599627370496,
"old_line": null,
"text": "<string>",
"no_trailing_newline": true
}
],
"new_count": 4503599627370495,
"new_start": 4503599627370495,
"old_count": 4503599627370495,
"old_start": 4503599627370495
}
],
"kind": "text",
"new_path": "<string>",
"old_path": "<string>",
"status": "<string>"
}
]
},
"observed_at": "2023-11-07T05:31:56Z",
"outcome": "recorded"
}
'import requests
url = "https://api.runaether.dev/computers/{computerID}/tasks/{taskID}/diffs/{diffID}"
payload = {
"diff": {
"additions": 4503599627370495,
"base_branch": "<string>",
"base_ref": "<string>",
"deletions": 4503599627370495,
"files": [
{
"additions": 4503599627370495,
"deletions": 4503599627370495,
"display_path": "<string>",
"hunks": [
{
"header": "<string>",
"lines": [
{
"kind": "add",
"new_line": 4503599627370496,
"old_line": None,
"text": "<string>",
"no_trailing_newline": True
}
],
"new_count": 4503599627370495,
"new_start": 4503599627370495,
"old_count": 4503599627370495,
"old_start": 4503599627370495
}
],
"kind": "text",
"new_path": "<string>",
"old_path": "<string>",
"status": "<string>"
}
]
},
"observed_at": "2023-11-07T05:31:56Z",
"outcome": "recorded"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
diff: {
additions: 4503599627370495,
base_branch: '<string>',
base_ref: '<string>',
deletions: 4503599627370495,
files: [
{
additions: 4503599627370495,
deletions: 4503599627370495,
display_path: '<string>',
hunks: [
{
header: '<string>',
lines: [
{
kind: 'add',
new_line: 4503599627370496,
old_line: null,
text: '<string>',
no_trailing_newline: true
}
],
new_count: 4503599627370495,
new_start: 4503599627370495,
old_count: 4503599627370495,
old_start: 4503599627370495
}
],
kind: 'text',
new_path: '<string>',
old_path: '<string>',
status: '<string>'
}
]
},
observed_at: '2023-11-07T05:31:56Z',
outcome: 'recorded'
})
};
fetch('https://api.runaether.dev/computers/{computerID}/tasks/{taskID}/diffs/{diffID}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.runaether.dev/computers/{computerID}/tasks/{taskID}/diffs/{diffID}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'diff' => [
'additions' => 4503599627370495,
'base_branch' => '<string>',
'base_ref' => '<string>',
'deletions' => 4503599627370495,
'files' => [
[
'additions' => 4503599627370495,
'deletions' => 4503599627370495,
'display_path' => '<string>',
'hunks' => [
[
'header' => '<string>',
'lines' => [
[
'kind' => 'add',
'new_line' => 4503599627370496,
'old_line' => null,
'text' => '<string>',
'no_trailing_newline' => true
]
],
'new_count' => 4503599627370495,
'new_start' => 4503599627370495,
'old_count' => 4503599627370495,
'old_start' => 4503599627370495
]
],
'kind' => 'text',
'new_path' => '<string>',
'old_path' => '<string>',
'status' => '<string>'
]
]
],
'observed_at' => '2023-11-07T05:31:56Z',
'outcome' => 'recorded'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.runaether.dev/computers/{computerID}/tasks/{taskID}/diffs/{diffID}"
payload := strings.NewReader("{\n \"diff\": {\n \"additions\": 4503599627370495,\n \"base_branch\": \"<string>\",\n \"base_ref\": \"<string>\",\n \"deletions\": 4503599627370495,\n \"files\": [\n {\n \"additions\": 4503599627370495,\n \"deletions\": 4503599627370495,\n \"display_path\": \"<string>\",\n \"hunks\": [\n {\n \"header\": \"<string>\",\n \"lines\": [\n {\n \"kind\": \"add\",\n \"new_line\": 4503599627370496,\n \"old_line\": null,\n \"text\": \"<string>\",\n \"no_trailing_newline\": true\n }\n ],\n \"new_count\": 4503599627370495,\n \"new_start\": 4503599627370495,\n \"old_count\": 4503599627370495,\n \"old_start\": 4503599627370495\n }\n ],\n \"kind\": \"text\",\n \"new_path\": \"<string>\",\n \"old_path\": \"<string>\",\n \"status\": \"<string>\"\n }\n ]\n },\n \"observed_at\": \"2023-11-07T05:31:56Z\",\n \"outcome\": \"recorded\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.runaether.dev/computers/{computerID}/tasks/{taskID}/diffs/{diffID}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"diff\": {\n \"additions\": 4503599627370495,\n \"base_branch\": \"<string>\",\n \"base_ref\": \"<string>\",\n \"deletions\": 4503599627370495,\n \"files\": [\n {\n \"additions\": 4503599627370495,\n \"deletions\": 4503599627370495,\n \"display_path\": \"<string>\",\n \"hunks\": [\n {\n \"header\": \"<string>\",\n \"lines\": [\n {\n \"kind\": \"add\",\n \"new_line\": 4503599627370496,\n \"old_line\": null,\n \"text\": \"<string>\",\n \"no_trailing_newline\": true\n }\n ],\n \"new_count\": 4503599627370495,\n \"new_start\": 4503599627370495,\n \"old_count\": 4503599627370495,\n \"old_start\": 4503599627370495\n }\n ],\n \"kind\": \"text\",\n \"new_path\": \"<string>\",\n \"old_path\": \"<string>\",\n \"status\": \"<string>\"\n }\n ]\n },\n \"observed_at\": \"2023-11-07T05:31:56Z\",\n \"outcome\": \"recorded\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runaether.dev/computers/{computerID}/tasks/{taskID}/diffs/{diffID}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"diff\": {\n \"additions\": 4503599627370495,\n \"base_branch\": \"<string>\",\n \"base_ref\": \"<string>\",\n \"deletions\": 4503599627370495,\n \"files\": [\n {\n \"additions\": 4503599627370495,\n \"deletions\": 4503599627370495,\n \"display_path\": \"<string>\",\n \"hunks\": [\n {\n \"header\": \"<string>\",\n \"lines\": [\n {\n \"kind\": \"add\",\n \"new_line\": 4503599627370496,\n \"old_line\": null,\n \"text\": \"<string>\",\n \"no_trailing_newline\": true\n }\n ],\n \"new_count\": 4503599627370495,\n \"new_start\": 4503599627370495,\n \"old_count\": 4503599627370495,\n \"old_start\": 4503599627370495\n }\n ],\n \"kind\": \"text\",\n \"new_path\": \"<string>\",\n \"old_path\": \"<string>\",\n \"status\": \"<string>\"\n }\n ]\n },\n \"observed_at\": \"2023-11-07T05:31:56Z\",\n \"outcome\": \"recorded\"\n}"
response = http.request(request)
puts response.read_body{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}Authorizations
Path Parameters
Body
application/json
- Option 1
- Option 2
What the machine bridge recorded of a task's work tree when a turn ended: recorded with the diff, or failed with why there is none.
Response
No Content