Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,13 @@ task's latest lease (it may have expired, see [Tasks and leases](#6-tasks-and-le
- A cancelled task that was never leased answers every report with `409 lease_lost`, because no lease
of it exists.
- A task of another user, or an unknown id, is `404 not_found` before any of the above.
- An app MAY end a task as `completed` on its own while `L` still runs, for example when the agent
asks the user a question through the app's MCP tools and the user's answer becomes a new task.
Until `L` reports, `L` stays the completing lease: its `events` answer `200 leased` with the
renewed lease (the client keeps the agent running until it exits), its `complete` records the
run's `duration_ms` and `usage` and answers `200 completed`, and its `fail` is
`409 invalid_state`. `GET task` shows `completed` meanwhile. Once `L` has sent `complete`, the
row "`completed` by L" applies. The client needs nothing new: it reports as it always does.

## 13. Errors

Expand Down
Loading