curl --request POST \
--url https://api.example.com/api/tasks/{task_id}/prs/{pr_id}/fix-ciimport requests
url = "https://api.example.com/api/tasks/{task_id}/prs/{pr_id}/fix-ci"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/api/tasks/{task_id}/prs/{pr_id}/fix-ci', 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.example.com/api/tasks/{task_id}/prs/{pr_id}/fix-ci",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/tasks/{task_id}/prs/{pr_id}/fix-ci"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/tasks/{task_id}/prs/{pr_id}/fix-ci")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/tasks/{task_id}/prs/{pr_id}/fix-ci")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"prompt": "<string>",
"display": "",
"kind": "system_event"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Fix Ci
Compose the agent’s fix-CI prompt for the given PR — does NOT send it. The frontend takes the prompt and calls the normal sendMessage flow so the chat UI reacts as if the user typed it.
The composition is server-side because we re-fetch the current failing-check names from GitHub right before building the prompt; that keeps the model’s context fresh and avoids the frontend duplicating the github_service round-trip + failure aggregation logic. The user message that lands in chat IS the prompt below — so the user can read exactly what was asked, and any follow-up turns can refer to it like any other message.
curl --request POST \
--url https://api.example.com/api/tasks/{task_id}/prs/{pr_id}/fix-ciimport requests
url = "https://api.example.com/api/tasks/{task_id}/prs/{pr_id}/fix-ci"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/api/tasks/{task_id}/prs/{pr_id}/fix-ci', 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.example.com/api/tasks/{task_id}/prs/{pr_id}/fix-ci",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/tasks/{task_id}/prs/{pr_id}/fix-ci"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/tasks/{task_id}/prs/{pr_id}/fix-ci")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/tasks/{task_id}/prs/{pr_id}/fix-ci")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"prompt": "<string>",
"display": "",
"kind": "system_event"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Response
Successful Response
Server-composed fix-CI prompt for the frontend to send as a system-event chat message via the existing useTaskStream.sendMessage flow. Returning the prompt (rather than streaming the message server-side) lets the chat UI render the optimistic chip, stream the assistant chunks live, and persist the exchange via the same code path as a hand-typed message — no separate "did the chat update?" plumbing for synthetic messages.
display is the short chip text the chat should SHOW (persisted as
the message content via TaskMessageCreate.display_content); prompt
is the full instruction only the agent receives. kind is always
"system_event" — echoed so the frontend forwards it verbatim.