Skip to content

docs: add ADR-002 for coherent task history (timeline + artifacts) - #2084

Merged
herczyn merged 2 commits into
a2aproject:dev-1.1from
herczyn:adr-coherent-task-history
Aug 11, 2026
Merged

herczyn merged 2 commits into
a2aproject:dev-1.1from
herczyn:adr-coherent-task-history

Conversation

@herczyn

@herczyn herczyn commented Jul 30, 2026

Copy link
Copy Markdown
Member

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.md and proposes an additive, backward-compatible model for v1.1:

The full event-sourced / unify Message+Artifact direction 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

@herczyn
herczyn requested a review from a team as a code owner July 30, 2026 11:51
@herczyn

herczyn commented Aug 4, 2026

Copy link
Copy Markdown
Member Author

/vote

@git-vote

git-vote Bot commented Aug 4, 2026

Copy link
Copy Markdown

Vote created

@herczyn has called for a vote on docs: add ADR-002 for coherent task history (timeline + artifacts) (#2084).

The members of the following teams have binding votes:

Team
@a2aproject/a2a-tsc

Non-binding votes are also appreciated as a sign of support!

How to vote

You can cast your vote by reacting to this comment. The following reactions are supported:

In favor Against Abstain
👍 👎 👀

Please note that voting for multiple options is not allowed and those votes won't be counted.

The vote will be open for 11months 29days 3h 50m 24s. It will pass if at least 51% of the users with binding votes vote In favor 👍. Once it's closed, results will be published here as a new comment.

@git-vote

git-vote Bot commented Aug 5, 2026

Copy link
Copy Markdown

Vote status

So far 25.00% of the users with binding vote are in favor and 0.00% are against (passing threshold: 51%).

Summary

In favor Against Abstain Not voted
2 0 0 6

Binding votes (2)

User Vote Timestamp
maeste In favor 2026-08-04 16:50:32.0 +00:00:00
muscariello In favor 2026-08-05 15:19:00.0 +00:00:00
@darrelmiller Pending
@ToddSegal Pending
@sugandhrakha Pending
@siwachabhi Pending
@SivaNSAP Pending
@spetschulatSFDC Pending

Non-binding votes (1)

User Vote Timestamp
herczyn In favor 2026-08-04 16:34:32.0 +00:00:00

@sugandhrakha

Copy link
Copy Markdown

/check-vote

@git-vote

git-vote Bot commented Aug 6, 2026

Copy link
Copy Markdown

Votes can only be checked once a day.

@git-vote

git-vote Bot commented Aug 6, 2026

Copy link
Copy Markdown

Vote status

So far 50.00% of the users with binding vote are in favor and 0.00% are against (passing threshold: 51%).

Summary

In favor Against Abstain Not voted
4 0 0 4

Binding votes (4)

User Vote Timestamp
ToddSegal In favor 2026-08-06 16:12:51.0 +00:00:00
maeste In favor 2026-08-04 16:50:32.0 +00:00:00
muscariello In favor 2026-08-05 15:19:00.0 +00:00:00
sugandhrakha In favor 2026-08-05 21:19:29.0 +00:00:00
@darrelmiller Pending
@siwachabhi Pending
@SivaNSAP Pending
@spetschulatSFDC Pending

Non-binding votes (1)

User Vote Timestamp
herczyn In favor 2026-08-04 16:34:32.0 +00:00:00

3 similar comments
@git-vote

git-vote Bot commented Aug 7, 2026

Copy link
Copy Markdown

Vote status

So far 50.00% of the users with binding vote are in favor and 0.00% are against (passing threshold: 51%).

Summary

In favor Against Abstain Not voted
4 0 0 4

Binding votes (4)

User Vote Timestamp
ToddSegal In favor 2026-08-06 16:12:51.0 +00:00:00
maeste In favor 2026-08-04 16:50:32.0 +00:00:00
muscariello In favor 2026-08-05 15:19:00.0 +00:00:00
sugandhrakha In favor 2026-08-05 21:19:29.0 +00:00:00
@darrelmiller Pending
@siwachabhi Pending
@SivaNSAP Pending
@spetschulatSFDC Pending

Non-binding votes (1)

User Vote Timestamp
herczyn In favor 2026-08-04 16:34:32.0 +00:00:00

@git-vote

git-vote Bot commented Aug 8, 2026

Copy link
Copy Markdown

Vote status

So far 50.00% of the users with binding vote are in favor and 0.00% are against (passing threshold: 51%).

Summary

In favor Against Abstain Not voted
4 0 0 4

Binding votes (4)

User Vote Timestamp
ToddSegal In favor 2026-08-06 16:12:51.0 +00:00:00
maeste In favor 2026-08-04 16:50:32.0 +00:00:00
muscariello In favor 2026-08-05 15:19:00.0 +00:00:00
sugandhrakha In favor 2026-08-05 21:19:29.0 +00:00:00
@darrelmiller Pending
@siwachabhi Pending
@SivaNSAP Pending
@spetschulatSFDC Pending

Non-binding votes (1)

User Vote Timestamp
herczyn In favor 2026-08-04 16:34:32.0 +00:00:00

@git-vote

git-vote Bot commented Aug 9, 2026

Copy link
Copy Markdown

Vote status

So far 50.00% of the users with binding vote are in favor and 0.00% are against (passing threshold: 51%).

Summary

In favor Against Abstain Not voted
4 0 0 4

Binding votes (4)

User Vote Timestamp
ToddSegal In favor 2026-08-06 16:12:51.0 +00:00:00
maeste In favor 2026-08-04 16:50:32.0 +00:00:00
muscariello In favor 2026-08-05 15:19:00.0 +00:00:00
sugandhrakha In favor 2026-08-05 21:19:29.0 +00:00:00
@darrelmiller Pending
@siwachabhi Pending
@SivaNSAP Pending
@spetschulatSFDC Pending

Non-binding votes (1)

User Vote Timestamp
herczyn In favor 2026-08-04 16:34:32.0 +00:00:00

@git-vote

git-vote Bot commented Aug 10, 2026

Copy link
Copy Markdown

Vote status

So far 50.00% of the users with binding vote are in favor and 0.00% are against (passing threshold: 51%).

Summary

In favor Against Abstain Not voted
4 0 0 4

Binding votes (4)

User Vote Timestamp
ToddSegal In favor 2026-08-06 16:12:51.0 +00:00:00
maeste In favor 2026-08-04 16:50:32.0 +00:00:00
muscariello In favor 2026-08-05 15:19:00.0 +00:00:00
sugandhrakha In favor 2026-08-05 21:19:29.0 +00:00:00
@darrelmiller Pending
@siwachabhi Pending
@SivaNSAP Pending
@spetschulatSFDC Pending

Non-binding votes (1)

User Vote Timestamp
herczyn In favor 2026-08-04 16:34:32.0 +00:00:00

@vinoo999

Copy link
Copy Markdown
Contributor

Sorry, meant to get this down earlier...

I generally support the core a timeline of events ordered by generation, and getting off the TaskStatus.message overload. My hesitation is that the ADR goes beyond history into a few things I don't think it should be deciding here - and I either disagree or feel they are underspecified as part of this ADR:

  1. Artifacts as input question. Adding role to Artifact and making it client-writable only makes sense if there are client operations that join it and/or Message/Artifact is not to be unified in the future. It may enable bidi but I think this part can be deferred to that bidi conversation, no?

  2. Deprecating TaskStatus.message needs replacement events and feel this part is underspecified as part of the ADR (can defer to PR otherwise). That field rn carries both progress notifications and elicitation text. This ADR gives us the read side (timeline, elicitations) but not the write side/the event that actually delivers a progress update that doesn't change state. Today that's a same-state TaskStatusUpdateEvent. Is it now a role:agent timeline entry via [Feat]: Add TaskMessageUpdateEvent to notify observers when messages are added to task history #1811? And what carries an elicitation + its requestMessageId? Through v1.1 we'd be double-writing to TaskStatus.message and the timeline which may be okay but need semantics on what goes where and how. i.e. is there a TaskStatusUpdateEvent that puts something on the Task? For a client in the StreamMessage workflow, what are they able to consume?

  3. In the ADR, I'm a little confused on where generation, startGeneration, endGeneration will go: on the raw Artifact or on each event? For Artifacts that span multiple Tasks and/or multiple context ids we do not get interleaving and a context level, but that's possibly okay to be out of scope and can be deferred to [Epic] Multi-turn interaction gaps — state acceptance rules, interruptibility, and task lifecycle #1992. Assuming feat: add generation field to Task for ordering, long-polling, and optimistic concurrency #1810 is merged, I assume this ADR is saying that generation is on each Event, currentGeneration on Task and start and end on Artifact to provide appropriate sequencing in the Task?

Nit: we'll need to describe how historyLength is treated and what includeArtifacts may mean for the payload...

I'm non-binding but voting against as bundled.

@darrelmiller

darrelmiller commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

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.
I largely agree with @vinoo999 that narrowing the scope might be helpful

@git-vote

git-vote Bot commented Aug 11, 2026

Copy link
Copy Markdown

Vote status

So far 75.00% of the users with binding vote are in favor and 0.00% are against (passing threshold: 51%).

Summary

In favor Against Abstain Not voted
6 0 0 2

Binding votes (6)

User Vote Timestamp
ToddSegal In favor 2026-08-06 16:12:51.0 +00:00:00
darrelmiller In favor 2026-08-11 15:43:25.0 +00:00:00
maeste In favor 2026-08-04 16:50:32.0 +00:00:00
muscariello In favor 2026-08-05 15:19:00.0 +00:00:00
spetschulatSFDC In favor 2026-08-11 16:06:24.0 +00:00:00
sugandhrakha In favor 2026-08-05 21:19:29.0 +00:00:00
@siwachabhi Pending
@SivaNSAP Pending

Non-binding votes (3)

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

@herczyn
herczyn requested review from a team as code owners August 11, 2026 19:59
@herczyn
herczyn merged commit 809fdd4 into a2aproject:dev-1.1 Aug 11, 2026
5 of 6 checks passed
@git-vote

git-vote Bot commented Aug 12, 2026

Copy link
Copy Markdown

Vote closed

The vote passed! 🎉

75.00% of the users with binding vote were in favor and 0.00% were against (passing threshold: 51%).

Summary

In favor Against Abstain Not voted
6 0 0 2

Binding votes (6)

User Vote Timestamp
@ToddSegal In favor 2026-08-06 16:12:51.0 +00:00:00
@darrelmiller In favor 2026-08-11 15:43:25.0 +00:00:00
@maeste In favor 2026-08-04 16:50:32.0 +00:00:00
@muscariello In favor 2026-08-05 15:19:00.0 +00:00:00
@spetschulatSFDC In favor 2026-08-11 16:06:24.0 +00:00:00
@sugandhrakha In favor 2026-08-05 21:19:29.0 +00:00:00

Non-binding votes (3)

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

herczyn added a commit that referenced this pull request Sep 22, 2026
…(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
msampathkumar pushed a commit that referenced this pull request Oct 13, 2026
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants