delimit_agent_complete
Close a dispatched agent task by recording the result summary and files changed, changing task status from dispatched to completed.
Instructions
Close a dispatched agent task by recording the outcome (Pro).
When to use: at the end of an engineering subagent's work, to record the result summary and the files touched on the dispatch record. This is the closing step of the dispatch lifecycle (delimit_agent_dispatch -> [subagent runs] -> this). Without calling this, the task remains "dispatched" in the ledger and dashboards will count it as in-flight. When NOT to use: to hand off ownership to a different model (use delimit_agent_handoff), to dispatch a fresh task (delimit_agent_dispatch), or to read task status without closing (delimit_agent_status). Also: do not call repeatedly on the same task_id — the backend treats a second complete as an error.
Sibling contrast: delimit_agent_handoff transfers active ownership to another model (task stays open); this closes ownership entirely. delimit_agent_status is the read-only sibling.
Side effects: writes a completion record via
ai.agent_dispatch.complete_task — the task's status flips from
"dispatched" to "completed", result and files_changed are
persisted, and an audit log entry is appended. files_changed
is coerced from a comma string to a list. No license gate at
this level (handled by the backend). No notification — pair
with delimit_notify if the operator needs to be told.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task_id | Yes | Task id from delimit_agent_dispatch. Required. | |
| result | No | Summary of what was done. | |
| files_changed | No | Comma-separated paths of modified files. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||