Add case entry
add_entryFile immutable case entries for decisions, attempts, findings, artifacts, remarks, acceptances, or notes so agent work persists across sessions and cannot be edited or deleted.
Instructions
Files an entry without payload: a decision, attempt, finding, artifact, remark, acceptance or note.
Entries are immutable: no call edits or deletes one, and a mistaken entry is
corrected by a new entry that references it in refs. Summaries, questions,
answers, verdicts and resolutions have their own tools: add_summary, ask,
answer, add_verdict, resolve.
An empty title is refused with entry_fields_invalid, which lists the fields.
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 | |
| refs | No | References: task entries `TRK-42#12`, project entries `TRK#7`, tasks `TRK-7`, or a URL with a scheme (`https://…`, `file://…`). Anything else (`7`, `#7`, `docs/x.md`) is refused with `entry_fields_invalid`, as is an entry, task or project that does not exist; URLs are not checked | |
| type | Yes | What the entry records: - `decision` — an option chosen among several, with the reason; a choice that outlives the task and that other tasks are to follow is a project decision, filed by `add_project_entry`; - `attempt` — something tried and how it ended, failed attempts included; - `finding` — an established fact with its source, including what was learned from reading; - `artifact` — a pointer to a result; - `remark` — a claim that finished work of a task came out wrong, written from the side of whoever needs the result; the task's assignee resolves it with `resolve`. A remark on a closed task is accepted: the case grows, the task stays as it is. An observation about the caller's own task is a `finding`, not a `remark`. A remark filed after a `warning` clears it; - `acceptance` — the gap named by an open `warning` is accepted, which clears it; refused with `warning_not_open` without one, and with `acceptance_by_closer` from the signature that closed the task; - `note` — an entry that fits none of the types above | |
| title | Yes | Entry title: its line in the case index of `get_task`. It states what happened, not how | |
| 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 |