Skip to content

fix: use POST for SubscribeToTask binding#1891

Open
jstar0 wants to merge 2 commits into
a2aproject:mainfrom
jstar0:fix/subscribe-task-post-binding
Open

fix: use POST for SubscribeToTask binding#1891
jstar0 wants to merge 2 commits into
a2aproject:mainfrom
jstar0:fix/subscribe-task-post-binding

Conversation

@jstar0

@jstar0 jstar0 commented May 28, 2026

Copy link
Copy Markdown

Summary

  • Change the SubscribeToTask HTTP annotation from GET /tasks/{id}:subscribe to POST /tasks/{id}:subscribe.
  • Apply the same change to the tenant-scoped binding.
  • Add body: "*" to both custom POST bindings so the proto passes the API linter.

Changes

  • Updated the default SubscribeToTask REST binding to use post.
  • Updated the tenant-scoped SubscribeToTask REST binding to use post.
  • Added body: "*" to both custom POST bindings, matching the API linter requirement for custom POST methods.

Why

The protocol documentation already lists Subscribe to task as POST /tasks/{id}:subscribe in the REST method mapping and task operations sections. The proto annotation still used get, so generated REST bindings could disagree with the published specification.

Scope

This only updates the SubscribeToTask HTTP binding in specification/a2a.proto. It does not change the request message shape or any other task operation.

Fixes #1819
Fixes: #1574

Verification

(cd specification && buf dep update && buf export buf.build/googleapis/googleapis --output=.googleapis)
api-linter --config specification/.api-linter.yaml --output-format github --set-exit-status --proto-path specification --proto-path specification/.googleapis specification/a2a.proto
protoc -I specification -I specification/.googleapis --descriptor_set_out=/tmp/a2a.pb specification/a2a.proto
./scripts/build_docs.sh

@jstar0 jstar0 requested a review from a team as a code owner May 28, 2026 18:29

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the SubscribeToTask RPC in specification/a2a.proto by changing its HTTP method from GET to POST and adding a wildcard body mapping (body: "*") for both the primary and additional bindings. There are no review comments, and I have no feedback to provide.

@jstar0 jstar0 changed the title fix(spec): use POST for SubscribeToTask binding fix: use POST for SubscribeToTask binding Jun 5, 2026
@darrelmiller

Copy link
Copy Markdown
Contributor

Action: Review all SDKs to see if any actually use GET. If we can convince ourselves that it doesn't break any existing deployments, we should accept this.

@muscariello

Copy link
Copy Markdown
Member

@darrelmiller @herczyn

JS/Go/Java use POST now
Python/Rust use POST as canonical method while GET as legacy.

@Tehsmash

Copy link
Copy Markdown
Contributor

Going backwards in the repo this was a bug ('POST' in specification and 'GET' in the proto) since the methods were introduced in the specification in v0.2.6, we just never noticed:

4cfa452#diff-eebad86dc55e949d1d0630c4a2e92fed2a16b19e0ab623719ed429b5d3eee101R1084

get: "/v1/{name=tasks/*}:subscribe"

As all the SDKs seem to have standardised on the written spec 'POST', for v1.0 I think we correct this to 'POST', for v0.3 there isn't much we can do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: a2a.proto and specification divergence on subscribeToTask [Bug]: The proto definition of "Subscribes to task" is incorrect

6 participants