Skip to content

[Bug]: message/stream does not begin with the Task object when the agent opens the task with a status update (spec §3.1.2) #1352

Open

Description

@joulook

We are a research team at MPI-SWS building Daavar, a conformance checker for distributed protocol implementations: it explores every message interleaving of a program written against our message-passing API and compares the behaviours of an implementation with those of a specification program, or of two implementations with each other. We ran it on the A2A specification text and on a2a-java and a2a-rs; this issue is one of the results, with the evidence and the reproduction below.

What happened?

Spec §3.1.2: "If the agent returns a Task, the stream MUST begin with the Task object". DefaultRequestHandler.onMessageSendStream relays whatever the executor emits first, so with the documented pattern (emitter.submit(); emitter.startWork();) the stream begins with a TaskStatusUpdateEvent and no Task is ever sent. onSubscribeToTask already prepends the stored task, citing §3.1.6.

To reproduce. An AgentExecutor whose execute calls emitter.startWork() then emitter.complete(); a streaming message that creates a new task. Stream: [TaskStatusUpdateEvent(WORKING), TaskStatusUpdateEvent(COMPLETED)]. Expected: the Task first. A continuation turn behaves the same.

The ACTS suite does not catch this: its streaming tests check event counts, monotonic states and the final event (STREAM-SSE-001), and the first event of a subscribe (STREAM-SSE-004, which also accepts a status update there). We are proposing a must test for the corpus.

Counts are uncovered words / all words of the checked side; a word is one distinct observation of the client and server roles (server-executor messages included) within a sequential model of each server core and a fixed scenario. Over 14 scenarios (one server, with and without a second cancel; a two-server delegation in six variants, A answering locally or B answering in one of five ways; the same delegation gated), 97 words of the a2a-java model are rejected, every one a stream that begins with a status update and contains no Task (one server: 11 of 18). Model results: a2a-java model of f40664f (equivalent under the model's abstraction to 586fdd5; later changes on main not rechecked), a2a-rs model of 700a6a2. A PR follows.

Source lines and consequences
Reproduce

Full evidence: benchmarks/a2a-task at tag a2a-fixes-2026-11-21.

git clone --recurse-submodules https://github.com/joulook/daavar.git && cd daavar
git checkout a2a-fixes-2026-11-21 && git submodule update --init --recursive
(cd traceforge && cargo build --release -p traceforge --bin conf-join)
cd benchmarks/a2a-task/rust && cargo build --release
B=target/release/tf_a2a_task; J=../../../traceforge/target/release/conf-join
(cd ../../../jmc && ./gradlew -q --no-daemon --init-script ../scripts/print-classpath.gradle :core:printTestClasspath)
CP=$(cat ../../../jmc/cp.txt); mkdir -p classes report && javac -d classes -cp "$CP" ../java/bench/a2a_task/*.java
$B export spec --out spec.jsonl --model fifo -- spec,n
java -Xss4m -cp "classes:$CP" org.mpi_sws.jmc.mp.launch.MpLauncher bench.a2a_task.A2ATask:impl,n must 0 1 "$PWD/report" "$PWD/java.jsonl" 3600
$J --decide spec.jsonl java.jsonl   # 11 of 18 uncovered

The join's uncovered line is the figure quoted above. With the driver at the same tag: bin/daavar check benchmarks/a2a-task --scenario one --cell n --directions 'java<=spec'.

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. added a commit that references this issue on Nov 22, 2026
    366f1b8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions