Repository navigation
docs: add ADR-002 for coherent task history (timeline + artifacts) - #2084
Conversation
|
/vote |
Vote created@herczyn has called for a vote on The members of the following teams have binding votes:
Non-binding votes are also appreciated as a sign of support! How to voteYou can cast your vote by reacting to
Please note that voting for multiple options is not allowed and those votes won't be counted. The vote will be open for |
Vote statusSo far Summary
Binding votes (2)
|
| User | Vote | Timestamp |
|---|---|---|
| herczyn | In favor | 2026-08-04 16:34:32.0 +00:00:00 |
|
/check-vote |
|
Votes can only be checked once a day. |
Vote statusSo far Summary
Binding votes (4)
|
| User | Vote | Timestamp |
|---|---|---|
| herczyn | In favor | 2026-08-04 16:34:32.0 +00:00:00 |
3 similar comments
Vote statusSo far Summary
Binding votes (4)
|
| User | Vote | Timestamp |
|---|---|---|
| herczyn | In favor | 2026-08-04 16:34:32.0 +00:00:00 |
Vote statusSo far Summary
Binding votes (4)
|
| User | Vote | Timestamp |
|---|---|---|
| herczyn | In favor | 2026-08-04 16:34:32.0 +00:00:00 |
Vote statusSo far Summary
Binding votes (4)
|
| User | Vote | Timestamp |
|---|---|---|
| herczyn | In favor | 2026-08-04 16:34:32.0 +00:00:00 |
Vote statusSo far Summary
Binding votes (4)
|
| User | Vote | Timestamp |
|---|---|---|
| herczyn | In favor | 2026-08-04 16:34:32.0 +00:00:00 |
|
Sorry, meant to get this down earlier... I generally support the core a
Nit: we'll need to describe how I'm non-binding but voting against as bundled. |
|
I'm supportive in spirit of this ADR. I think there may be a few details that we can iron out when doing the PR on the spec. |
Vote statusSo far Summary
Binding votes (6)
|
| User | Vote | Timestamp |
|---|---|---|
| herczyn | In favor | 2026-08-04 16:34:32.0 +00:00:00 |
| vinoo999 | Against | 2026-08-11 9:38:25.0 +00:00:00 |
| Tehsmash | In favor | 2026-08-11 16:05:28.0 +00:00:00 |
Vote closedThe vote passed! 🎉
Summary
Binding votes (6)
|
…(ADR-002) (#2129) Fixes #1991 ## Summary Implements the coherent task history model from **ADR-002** (#2084, tracking #1991) in the proto (`specification/a2a.proto`) and the normative spec prose (`docs/specification.md`), on top of the merged `generation` field (#1810). **Additive and backward compatible**, and deliberately **introduces no new wire event**: the timeline reuses the existing `TaskStatusUpdateEvent` for delivery. > Elicitations were **split out** of this PR into #2149 following review feedback, so this change is now scoped to the timeline alone. ## Design (why it's non-breaking) The `timeline` is a restructuring of the **Task snapshot**, not a new event on the wire. `TimelineEntry` is a `oneof`: - `Message message` — client messages recorded in the task. - `TaskStatus status` — agent status progression (state + the agent's `message`), delivered by the **existing** `TaskStatusUpdateEvent`. This matters because a new member of the stream event union is **not** safely ignorable today: a2a-go, a2a-java and a2a-rs all hard-error on an unrecognised event (java's `StreamingEventKind` is a `sealed interface`), a2a-python raises on strict `ParseDict`, and a2a-js / python-gRPC silently drop it. Reusing an existing event avoids that entirely. `TaskStatus.message` is **retained** (not deprecated): the "latest status message" pollution problem is solved by the timeline retaining the *full ordered* sequence of statuses rather than just the head. ## What's included 1. **`TimelineEntry`** `{ oneof { Message message; TaskStatus status } int64 generation }` + `repeated TimelineEntry timeline` on `Task`. Widens `generation` so appending a timeline entry increments it (previously only `TaskState` transitions and artifact add/update counted, so a progress message that doesn't change state wouldn't advance it). 2. **Artifact interleaving** — `start_generation` / `end_generation` on `Artifact`, so artifacts are placed relative to timeline entries without per-chunk events flooding the timeline. 3. **`history` deprecation** — the timeline supersedes it, so `Task.history` and the three `history_length` params are soft-deprecated and `timeline_length` added. Deprecated fields stay populated/honored through v1.x, removed in 2.0. 4. **Spec prose** — Task Timeline Semantics (§3.2.8), artifact interleaving, the deprecation, the widened generation mutation set, and a `TimelineEntry` object section. ## Notes for reviewers - **Fail-open is normative**: clients **MUST** skip a `TimelineEntry` whose `oneof` kind they don't recognise (its `generation` still counts), so future entry kinds are additive. - **Timeline generations are monotonic but not contiguous** — artifact updates also consume generation numbers, so gaps between entries are expected. - Live delivery of *client-message* timeline entries to third-party subscribers is deferred to the bidirectional work (a new method, where both parties are 1.1 by construction). - `Artifact.role` was dropped from this PR and deferred to bidi, per review. Related: #2084 (ADR-002), #2149 (elicitations), #1810, #1794
…tics (#2270) ## Summary Clarifies that task states are **terminal** or **non-terminal**, and that the interrupted states `TASK_STATE_INPUT_REQUIRED` and `TASK_STATE_AUTH_REQUIRED` are **non-terminal**. A non-terminal task stays under the server's control: the server **MAY** keep processing it and transition it to any other state — including out of an interrupted state — without a message from the client, and **MAY** keep accepting messages directed to it. Entering a non-terminal state does not necessitate closing a streaming response. Prose-only. No new types, fields, or enum values, and no wire change. ## Motivation The interrupted states are already labelled "interrupted" in `a2a.proto`, and the streaming operations (§3.1.2, §3.1.6) already close a stream only on a terminal state. But the SSE binding prose (§11.7) said the stream closes on "a terminal **or interrupted** state", and the spec never stated plainly what terminal vs. non-terminal means. That left implementors inferring a stricter, client-driven model than the protocol requires — e.g. that `INPUT_REQUIRED` ends the turn and closes the stream. Nothing in the protocol prevents sending a message to a task in an interrupted state, or an agent moving a task out of an interrupted state on its own. The server owns the task lifecycle; sending to a running task is otherwise underspecified for interop (#1992). This PR states the rule once, at the `TaskState` level, so bindings have a single thing to implement against. It also unblocks the input-required discussion and complements the steering extension (#2125). ## Changes - `specification/a2a.proto` — `TaskState` enum comment: define terminal vs. non-terminal/interrupted at the lifecycle level. Per-state comments unchanged. - `docs/specification.md` §4.1.3 — matching normative definition under the enum table. Delivery-agnostic; streaming stays in the streaming operation. - `docs/specification.md` §3.1.2 — in the Task lifecycle stream, a non-terminal/interrupted state SHOULD NOT by itself close the stream (terminal still MUST). - `docs/specification.md` §11.7 — drop "or interrupted" from the SSE close rule; point to §3.1.2. ## Breaking change? Drafted as SHOULD NOT (not MUST NOT) so no conforming implementation is invalidated. The only behavioral shift is for servers that close the SSE stream on an interrupted state today (see Appendix). Opening a vote to record whether this counts as breaking. ## Non-goals - Elicitations — deferred to an extension (ADR-002 / #2084). - Deprecating `TaskStatus.message` — how an agent describes the requested input is a docs concern, not this change. - Blocking `SendMessage` / `return_immediately` semantics — unchanged. - Steering an actively `WORKING` task — separate extension, #2125. ## Appendix: current SDK behavior (server side) Which SDK server implementations end a streaming response when a task enters an interrupted state: | SDK | Closes on `input-required`? | Closes on `auth-required`? | Where | |---|---|---|---| | a2a-python `DefaultRequestHandlerV2` (default) | No | No | `active_task.py` — `INTERRUPTED_TASK_STATES` kept disjoint from `TERMINAL_TASK_STATES`; stream handler has no state-based break | | a2a-python `LegacyRequestHandler` | Yes | No | `event_consumer.py: consume_all()` — `is_final_event` set includes `INPUT_REQUIRED` (#167) | | a2a-go | Yes | No | `internal/taskupdate/final.go: IsFinal()` → `state.Terminal() \|\| state == TaskStateInputRequired` | | a2a-js | Yes | No | `execution_event_queue.ts: events()` stop set = `TERMINAL_STATE_LIST \|\| INPUT_REQUIRED_STATE_LIST` (AUTH excluded) | | a2a-dotnet | Yes | Yes | `TaskUpdater.cs` — `RequireInputAsync()` and `RequireAuthAsync()` both call `eventQueue.Complete()` | - `auth-required` is already broadly compliant; only a2a-dotnet closes on it. - `input-required` is the divergence: only a2a-python V2 (the default) keeps the stream open; go, js, python-legacy, and dotnet close. - Bringing an SDK in line is small and wire-neutral: drop `input-required` from the stop predicate (`IsFinal` in go, `events()` in js, `consume_all` in python-legacy), and stop calling `Complete()` in dotnet's `RequireInputAsync`/`RequireAuthAsync`. SHOULD NOT → MUST NOT is a candidate for a later minor once these converge. Related: #2084, #2129, #1992, #2125. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 <[email protected]>
Summary
Proposes ADR-002: Coherent Task History (Timeline + Artifacts) to capture the design decision behind #1991 before it is finalized, and to record the "additive v1.1 vs. event-sourced v2" fork explicitly.
The ADR follows
adrs/adr-template.mdand proposes an additive, backward-compatible model for v1.1:timelinecollection (client + agent messages + progress updates), ordered bygeneration(from [Feat]: Add generation/version number field to Task for event ordering, long-polling, and optimistic concurrency #1794/feat: add generation field to Task for ordering, long-polling, and optimistic concurrency #1810) so it stays reconstructable in bidirectional/multi-turn tasks.artifactscollection annotated withstart_generation/end_generation, so large/streamed artifacts interleave with the timeline without flooding it with per-chunk events.elicitationscollection (waiting | blocked | resolved) to model input-required additively, without changing existing task states.rolesignal onArtifact.TaskStatus.messagesoft-deprecated (kept populated with current SDK logic through v1.x for existing consumers; removed in 2.0).The full event-sourced / unify
Message+Artifactdirection is recorded as the motivation for a future v2 ADR rather than adopted now, to keep v1.1 shippable.Status is Proposed and Decision Makers is the TSC — opening this so the framing and considered options can be reviewed/adjusted before promotion to Accepted.
Related: #1991, #1794, #1810