Answer a run's questions
Answers the questions a needs_input run asked (its questions) and continues the work: the answers are posted on the ticket or issue as a reply from you, kept on the run, and the ticket starts again as a new run whose plan reads them word for word. The old run becomes retried with continued_run_id set. A run that isn't needs_input any more (answered, retried or closed meanwhile) is refused with 409.
api_key runsAuthorizationBearer <token>A team API key, made by an admin under Settings, API keys. Send it as Authorization: Bearer chk_....
Scope: runs
run_id*stringThe run's id.
application/json- body
Answers to a run's questions.
answers*array<>One entry per question answered. Questions left out (or blank) stay open; at least one needs an answer.
The work continues with the answers.
application/json- response
What answering did.
comment_url?|The reply on the ticket or issue, when its address is known.
"https://github.com/acme/web/issues/42#issuecomment-2211"posted*booleanWhether the answers were posted on the ticket or issue.
truerun_id*stringThe id of the run that continues the work. It shows in
GET /api/runs/{run_id} once it starts, within seconds.
"01JB8Z3N5Q7S9V1X3Z5B7D9F1H"status*stringcontinuing: the ticket is queued again with the answers.
"continuing"curl -X POST 'https://api.coderhelm.com/api/runs/01JB8X6F4M2C9QZ3T7V5W1K0HA/answer' \ -H "Authorization: Bearer $CODERHELM_API_KEY" \ -H 'Content-Type: application/json' \ -d '{ "answers": [ { "answer": "Production only. Staging keeps the old limit.", "question_id": "q1" } ]}'{ "comment_url": "https://github.com/acme/web/issues/42#issuecomment-2211", "posted": true, "run_id": "01JB8Z3N5Q7S9V1X3Z5B7D9F1H", "status": "continuing"}Get a run GET
Returns one run in full: its status and current step, the pull requests and branches it opened, the files it changed, token use and cost, and the notes it wrote while working. Poll it to follow a run; a few seconds apart is plenty.
Cancel a run POST
Stops a run that is `running`. The run becomes `cancelled`, and the work it has not done yet is dropped; a pull request it already opened stays open. A run in any other state answers `400`, so cancelling twice is harmless.