Goal: Let a caller follow an already-started task to completion with one command.
User story: As a CI author who started a task with --async, I want task get --wait to block until it finishes, so that a later step can wait for the result without a hand-written poll loop.
Priority: P1 · Area: CLI code
Problem
a2a task get is one-shot only. After starting a task with a2a send --async, there is no built-in way to block until it finishes — the caller must hand-roll a poll loop.
$ a2a task get sometask --wait ...
Error: unknown flag: --wait
$ a2a task get sometask --poll-interval 2s ...
Error: unknown flag: --poll-interval
Proposed behavior
Add a --wait flag to task get, with polling controls:
a2a task get <taskId> --wait --poll-interval 2s --timeout 60s
- Polls until the task reaches a terminal state (
COMPLETED/FAILED/CANCELED/REJECTED).
- Stops immediately on an interrupted state (
INPUT_REQUIRED/AUTH_REQUIRED) so the caller can act.
--poll-interval (suggested default 2s) and --timeout; on timeout, exit non-zero with a timeout error.
- Bounded backoff, no busy-loop; interruptible without losing the already-printed identifiers.
- Where the agent supports streaming, a wait MAY prefer streaming and fall back to polling.
Who benefits
- CI/CD jobs that fire
a2a send --async and later block on the result.
- AI coding agents that start long tasks and wait for completion without ad-hoc
sleep loops.
Acceptance criteria
Environment
- CLI version:
a2a version v0.0.0-…1e29dfe94f95+dirty
- OS: Linux x86_64
Notes
send currently exposes --polling-interval (default 5s); please converge on a single flag spelling across send and task get. Before implementing, check whether a polling helper is already provided by the underlying a2a-go/v2 SDK so it isn't re-implemented.
Goal: Let a caller follow an already-started task to completion with one command.
User story: As a CI author who started a task with --async, I want task get --wait to block until it finishes, so that a later step can wait for the result without a hand-written poll loop.
Priority: P1 · Area: CLI code
Problem
a2a task getis one-shot only. After starting a task witha2a send --async, there is no built-in way to block until it finishes — the caller must hand-roll a poll loop.Proposed behavior
Add a
--waitflag totask get, with polling controls:COMPLETED/FAILED/CANCELED/REJECTED).INPUT_REQUIRED/AUTH_REQUIRED) so the caller can act.--poll-interval(suggested default 2s) and--timeout; on timeout, exit non-zero with a timeout error.Who benefits
a2a send --asyncand later block on the result.sleeploops.Acceptance criteria
task get --waitpolls to a terminal state and returns the final task.INPUT_REQUIREDandAUTH_REQUIRED.--poll-intervaland--timeoutare honored; timeout exits non-zero.sendpolling flag (see note).Environment
a2a version v0.0.0-…1e29dfe94f95+dirtyNotes
sendcurrently exposes--polling-interval(default 5s); please converge on a single flag spelling acrosssendandtask get. Before implementing, check whether a polling helper is already provided by the underlyinga2a-go/v2SDK so it isn't re-implemented.