curl --request POST \
--url https://codecobra.ai/api/tasks/{task_id}/prs/{pr_id}/fix-ciimport requests
url = "https://codecobra.ai/api/tasks/{task_id}/prs/{pr_id}/fix-ci"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://codecobra.ai/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://codecobra.ai/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://codecobra.ai/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://codecobra.ai/api/tasks/{task_id}/prs/{pr_id}/fix-ci")
.asString();require 'uri'
require 'net/http'
url = URI("https://codecobra.ai/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>"
}
]
}Compose a fix-checks request
Builds the request that asks the task to fix this pull request’s failing checks, and returns it. Sending it is a separate step.
curl --request POST \
--url https://codecobra.ai/api/tasks/{task_id}/prs/{pr_id}/fix-ciimport requests
url = "https://codecobra.ai/api/tasks/{task_id}/prs/{pr_id}/fix-ci"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://codecobra.ai/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://codecobra.ai/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://codecobra.ai/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://codecobra.ai/api/tasks/{task_id}/prs/{pr_id}/fix-ci")
.asString();require 'uri'
require 'net/http'
url = URI("https://codecobra.ai/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.