Skip to content

docs(tasks/get): remove non-existent include_result flag from polling examples#3127

Merged
bokelley merged 1 commit into
mainfrom
bokelley/tasks-get-docs-3-0-1
Apr 25, 2026
Merged

docs(tasks/get): remove non-existent include_result flag from polling examples#3127
bokelley merged 1 commit into
mainfrom
bokelley/tasks-get-docs-3-0-1

Conversation

@bokelley

Copy link
Copy Markdown
Contributor

Summary

The 3.0 tasks/get request schema does not define an include_result field, and the response schema does not define a typed result field. Five doc files were inviting buyers to send include_result: true and read a typed completion payload off the polled response — neither is supported by the spec we shipped.

This patch corrects the docs to match what 3.0 actually ships:

  • Removed include_result: true from the polling examples in task-lifecycle.mdx, async-operations.mdx (two call sites), error-handling.mdx, and orchestrator-design.mdx.
  • Added a note on the canonical polling section in task-lifecycle.mdx stating that the completion payload (e.g. media_buy_id, packages from create_media_buy) is delivered via the seller's push notification to the buyer's webhook URL configured in push_notification_config on the original request. Buyers that need the completion payload MUST configure a webhook in 3.0; polling alone reports terminal status.
  • Pointed the note at clarify: tasks/get response — where does the completion payload live? #3123, which tracks the 3.1 schema-additive fix.

Why patch (3.0.1) and not minor (3.1)

Per docs/reference/versioning.mdx:

A patch release (3.0.1, 3.1.2) changes only documentation, wording, or validation that was diverging from the documented spec. Patches never change schema — no new fields, no renamed fields, no new enum values.

This PR only removes diverging wording and clarifies the existing-3.0 retrieval path. The schema-additive fix (typed include_result request flag + documented response projection on completion) is the second half of the work and is intentionally out of scope here — see #3123 and the follow-up 3.1 PR.

Test plan

  • npm run test:unit and npm run typecheck pass via pre-commit
  • grep -rn "include_result" docs/ static/ server/src/ returns only the new note in task-lifecycle.mdx (which references the planned 3.1 field by name)
  • Reviewer: confirm the webhook normative claim (buyers MUST configure webhook for payload retrieval in 3.0) reads correctly given existing seller behavior with additionalProperties: true

Closes part of #3123. Schema-additive follow-up tracked separately for 3.1.

🤖 Generated with Claude Code

… examples

The tasks/get request schema does not define include_result, and the
response schema does not define a typed result field. Five doc files
were inviting buyers to send include_result: true and read a typed
completion payload off the polled response — neither is supported by
the 3.0 spec.

Removed the spurious parameter from polling examples and added a note
in task-lifecycle.mdx stating that in 3.0 the completion payload
(e.g. media_buy_id, packages from create_media_buy) is delivered via
push_notification_config webhook; tasks/get polling reports terminal
status only.

Tracks #3123. Schema-additive fix (typed include_result + result
projection) is out of scope per the patch policy in
docs/reference/versioning.mdx and is targeted for 3.1.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@bokelley bokelley merged commit 5447aea into main Apr 25, 2026
17 checks passed
@bokelley bokelley deleted the bokelley/tasks-get-docs-3-0-1 branch April 25, 2026 13:15
bokelley added a commit that referenced this pull request Apr 25, 2026
…eset

After patch #3127 landed, the four polling examples in
async-operations.mdx, error-handling.mdx, orchestrator-design.mdx,
and task-lifecycle.mdx no longer demonstrated include_result. Now
that this PR makes the field spec-backed, restore include_result:
true in those examples and replace the 3.0-only note in
task-lifecycle.mdx with a description of the new field's semantics.

Also tightens the changeset to match the schema's "completed only"
constraint (was: "completed or failed") and lists the four doc
files updated alongside calling-an-agent.mdx.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
bokelley added a commit that referenced this pull request Apr 25, 2026
* feat(schema): add result and include_result to tasks/get (closes #3123)

tasks/get response had no typed field for the completion payload. Buyers polling
an async create_media_buy could see status: completed but had no schema-backed
field to retrieve media_buy_id and packages. The push-notification webhook
schema (mcp-webhook-payload.json) already defined result: $ref async-response-data.json;
this PR mirrors that pattern on the polling API.

Changes:
- tasks-get-response.json: add optional result field ($ref async-response-data.json)
  Present when status is completed and include_result was true; absent otherwise.
  For failed tasks, use the error field.
- tasks-get-request.json: add optional include_result boolean (default false).
  async-operations.mdx and task-lifecycle.mdx already referenced this parameter
  in code examples; this formalizes it in the schema.
- docs/protocol/calling-an-agent.mdx: add completed tasks/get response example
  showing the result field, closing the documentation gap.
- .changeset/tasks-get-result-field.md: minor bump (additive optional fields)

Non-breaking: both fields are optional. Existing polling consumers continue to
work; the typed field gives SDKs a stable, named key for the completion payload.
Unblocks adcp-client#967 (polling-cycle hardening).

https://claude.ai/code/session_013nAeRJTbEAmEdqvQit6Xmg

* docs: re-introduce include_result in polling examples and align changeset

After patch #3127 landed, the four polling examples in
async-operations.mdx, error-handling.mdx, orchestrator-design.mdx,
and task-lifecycle.mdx no longer demonstrated include_result. Now
that this PR makes the field spec-backed, restore include_result:
true in those examples and replace the 3.0-only note in
task-lifecycle.mdx with a description of the new field's semantics.

Also tightens the changeset to match the schema's "completed only"
constraint (was: "completed or failed") and lists the four doc
files updated alongside calling-an-agent.mdx.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot mentioned this pull request Apr 25, 2026
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.

1 participant