Answer question
answerResolve a task question by responding on its merits, or close it as withdrawn or replaced when it is stale or superseded. Requires the task key and question number.
Instructions
Answers a question of the same task, or closes it unanswered as withdrawn or
replaced. Any holder of a task token answers, in any task.
The first answer closes the question and later ones add to it; neither a
question nor an answer changes the task status. A withdrawn or replaced question
leaves questions of get_task and the open-question counts, and stays in the
case with this entry; a question that already has an answer is not withdrawn.
The tracker builds the title from the question reference and the outcome.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Task key `PROJECT-N`, case-insensitive; a previous key of a moved task addresses it as well. An unknown key is refused with `task_not_found` | |
| body | No | Entry body in markdown, stored and returned as is. It holds what a successor needs to continue; file contents and long outputs stay outside it, represented by a pointer and the gist | |
| outcome | No | How the question is closed, and what the body holds: - `answered` — an answer on its merits; the body is the answer; - `withdrawn` — the question is stale and needs no answer; the body gives the reason; - `replaced` — a later question of the same task, named in `replaced_by`, asks instead; the body gives the reason. `withdrawn` and `replaced` require a non-empty body and are accepted only while the question has no answer: otherwise `entry_fields_invalid`, `reason: already_answered` | answered |
| question_no | Yes | Number of the `question` entry in the same task. Any other number is refused with `entry_fields_invalid`, `reason: unknown_entry` or `not_a_question` | |
| replaced_by | No | Number of the `question` entry that replaces this one: in the same task and filed after it. Required with `replaced` and refused with any other outcome, both as `entry_fields_invalid` | |
| idempotency_key | No | Retry key chosen by the caller, e.g. a UUID. A repeat with the same key and the same arguments returns the first result and creates nothing; the same key with other arguments is refused with `idempotency_key_reused`. A key is bound to the caller's token and kept for 24 hours |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| no | Yes | Entry number in the task's case; with the key it forms `TRK-42#12` | |
| seq | Yes | Journal sequence number, usable as `after` of `wait_journal` | |
| title | Yes | The title the tracker built, for entry types whose title is not sent (summary, answer, verdict, resolution, service entries); `null` when the caller sent the title | |
| author | Yes | ||
| task_key | Yes | ||
| created_at | Yes |