Why does an instance accept a task it cannot resume: the `input-required` → `working` resurrection gap in A2A v1.0 task lifecycle handshakes
**Date of Record:** 2026 December 2 **Scope:** Applies to cross-vendor A2A v1.0 delegations where a remote task enters `input-required`, the client agent gathers the missing input, and then resumes via `tasks/send` or `tasks/sendSubscribe` against a task ID minted by a different vendor's runtime. Does not apply to single-vendor intra-process task managers or to tasks that never leave `submitted`.
Core Distinction
There are two distinct meanings of "task continuation" in A2A v1.0, and conflating them is the root of this failure:
- **State continuation** — the remote agent's `TaskStatus.state` transitions from `input-required` back to `working` because the client supplied the missing `Message` parts. The task object is the same; the `Task.id` is preserved; `history` appends.
- **Execution continuation** — the remote *runtime* still holds the ephemeral execution context (tool sandbox, partial plan, scratchpad, intermediate tool-call results) that was live when the task paused.
The protocol guarantees (1). It does **not** guarantee (2). The `AgentCard` advertises `capabilities.stateTransitionHistory` and a `pushNotifications` endpoint, but there is no field describing whether the remote runtime *retains execution context across an `input-required` suspension*, nor how long. A client that treats a successful `working` transition as evidence of context retention will silently resume a task whose underlying execution has been garbage-collected, rehydrated from a stale checkpoint, or — worse — replayed from step zero against side-effecting tools.
The invariant that actually holds is narrower than most client implementations assume: **`input-required` is a resumable state only if the remote runtime's suspension window exceeds the client's round-trip latency to gather input, and only if the remote's checkpoint is keyed on the same `contextId` the client resumes with.** Neither fact is discoverable from the `AgentCard`.
What Was Observed
A two-vendor handshake: orchestrator agent `A` (vendor X) delegates a multi-step reconciliation task to worker agent `B` (vendor Y). `B`'s `AgentCard` declares:
capabilities: { streaming: true, pushNotifications: true, stateTransitionHistory: true }
skills: [{ id: "reconcile-ledger", ... }]
`A` calls `tasks/send` with an initial `Message`. `B` transitions `submitted → working → input-required`, returning a `Task` with `id: t-8842`, `contextId: ctx-119`, and a `status.message` asking for a missing account identifier.
`A`'s planner needs ~40 seconds to resolve the identifier from an upstream system (a tool call plus a human-in-the-loop confirmation). It then issues `tasks/send` with `taskId: t-8842`, `contextId: ctx-119`, and a `Message` carrying the identifier.
`B` responds `200 OK` with `status.state: working`. `A` logs the handshake as successful and waits on `tasks/get` or the push channel.
What actually happens inside `B`, observed via its own audit trail:
- `B`'s runtime had a **30-second idle-suspension TTL** on `input-required` tasks. At t+30s the execution context was evicted; the `Task` object survived in durable storage, but its `workingMemory` ref (a pointer into an in-process scratchpad) was nulled.
- At t+40s, `A`'s resume arrives. `B`'s task manager validates `taskId` and `contextId`, sees state `input-required`, accepts the message, and transitions to `working` — **because the state machine permits it and the durable `Task` record is intact**.
- `B`'s executor, finding a null `workingMemory` ref, rehydrates from the last durable checkpoint. That checkpoint was written at the *start* of the original `working` phase, before the first tool call. So `B` re-executes the first three tool calls — two of which are idempotent reads, one of which is a `ledger.post_adjustment` write that is **not** idempotent.
- The reconciliation posts a duplicate adjustment. `A` sees `completed` and records success. The duplicate is discovered downstream 14 hours later.
The client-side failure was not a parsing error or a timeout. It was the acceptance of a `working` transition as proof of execution continuity. The protocol returned exactly what it promised; the client inferred more.
The same trace with a *streaming* client (`tasks/sendSubscribe`) fails differently but from the same cause: the client's SSE stream was closed when the task entered `input-required` (per spec, the stream terminates on terminal *and* interrupted states), and on resume the client opens a **new** stream. The new stream replays `stateTransitionHistory` from the durable `Task` record — which now includes the rehydrated `working` entry — so the client sees a clean history with no indication that an eviction occurred between the two `working` entries. The history is *consistent* and *wrong about continuity*.
Condition of Validity
The resurrection gap is bounded — the `working` transition is genuinely a continuation — only when **all** of the following hold. These are the conditions a client must verify before trusting a resume; none are expressible in the `AgentCard`.
- **Suspension window ≥ client gather latency.** The remote must not evict execution context before the resume arrives. Since the TTL is not advertised, the client must either (a) keep gather latency below the shortest plausible TTL (empirically 30–60s for hosted runtimes, unbounded for self-hosted), or (b) treat every resume as a potential cold rehydration and require the remote to declare it.
- **Checkpoint keyed on `contextId`, not on socket or process.** If the remote's checkpoint is keyed on the connection or the executor process (common in runtimes that pool executors), a resume that lands on a different executor instance rehydrates a *different* task's checkpoint or none. The `contextId` in the resume message is the only cross-instance key; a remote that does not use it as the checkpoint key is not resumable across a pool.
- **Rehydrated steps are idempotent or carry an idempotency key.** The client cannot know which steps will replay. Therefore the *client* must attach an idempotency key to the original delegation (e.g., in `Message.metadata`) and require the remote to honor it on replayed side-effecting tool calls — or the client must restrict delegation to read-only skills.
- **`stateTransitionHistory` distinguishes eviction from continuation.** A conformant-but-unhelpful remote emits two `working` entries with no intervening marker. A helpful remote emits an `input-required → working` pair *with* a metadata flag such as `rehydrated: true`. The client must treat the absence of such a flag as "unknown," not as "false."
When any condition fails, the resume is a **new execution wearing the old task's identity** — the task ID, context ID, and history are preserved, but the plan, scratchpad, and tool-call ledger are not.
Decision Boundary
The boundary is between **resume-as-continuation** and **resume-as-replay**, and it is decided by the remote's eviction behavior, which the client cannot observe directly. The client must therefore choose a policy at delegation time, not at resume time:
- **Policy R (resume-permissive):** accept any `working` transition as continuation. Valid only when the delegated skill is read-only or fully idempotent, and when gather latency is bounded below the minimum plausible TTL. Cheap, but silently corrupts state on the first non-idempotent replay.
- **Policy V (verify-on-resume):** on every `input-required → working` resume, require the remote to echo a `continuityToken` — an opaque value the client supplied in the original `Message.metadata` and that the remote must return only if it retained execution context. A missing token forces the client to treat the task as a fresh execution: re-issue with a new `taskId`, re-supply all prior context, and mark the old task `canceled` to prevent the remote from later resurrecting it.
- **Policy D (delegate-with-checkpoint):** the client does not rely on remote continuity at all. It treats `input-required` as a *terminal-for-this-delegation* state: it cancels the remote task, gathers input, and issues a brand-new delegation carrying a serialized summary of prior progress in `Message.metadata`. This is the only policy that is correct regardless of remote TTL, but it doubles the delegation count and requires the skill to accept a warm-start context blob.
The decision boundary is crossed when the client's gather latency exceeds the remote's (unknown) TTL **and** the skill contains a non-idempotent side effect **and** the client is on Policy R. Any two of the three are survivable; all three produce silent duplicate effects.
Operational Effect
The downstream consequences are not crashes but **continuity lies**:
- **Duplicate side effects under a clean task history.** The `Task.history` the client reads on completion shows a single logical execution. The replayed tool calls are not in the history because the remote's history records *state transitions*, not *tool invocations*. Auditors reconstructing the run from `history` will conclude one execution occurred; the remote's internal tool log will show two.
- **Baton-passing races in multi-agent swarms.** When the resumed task's result feeds a downstream agent `C`, `C` receives a result computed against a stale checkpoint. If `A` had also been updating shared state during the 40-second gather window (e.g., a second delegation touching the same ledger account), `B`'s replay computes against the pre-update state and the reconciliation diverges from `C`'s expectation. The divergence surfaces as a *peer disagreement* between `B` and `C`, not as a resume failure — misattributing the root cause to consensus logic rather than to the resurrection gap.
- **`canceled` tasks that refuse to die.** A client on Policy V that cancels the old task and re-issues will sometimes find the remote has *already* resumed the canceled task from a queued resume message (the resume was in flight when the cancel arrived). A2A v1.0 does not specify ordering between a `tasks/cancel` and a concurrent `tasks/send` resume on the same `taskId`. The remote may transition `canceled → working`, violating the client's assumption that `canceled` is terminal. The client must treat a post-cancel `working` as a protocol violation and refuse the result, but the side effects have already occurred.
- **Push-notification replay.** A remote with `pushNotifications` enabled may emit a `working` notification for the rehydrated execution and a second `completed` for the original — the client's webhook handler, keyed on `taskId`, deduplicates the second `completed` as a retry and drops the real result.
The guardrail that bounds all of this is a **client-side continuity ledger**: every delegation carries a client-generated `continuityToken` in `Message.metadata`; every resume must echo it; any resume that fails to echo it is treated as a fresh execution and the original task is quarantined (not canceled — cancellation races the resume) and flagged for reconciliation. The remote's `AgentCard` is consulted only for `capabilities.streaming` and `skills`; it is never consulted for continuity guarantees, because it cannot express them.
class ContinuityGapError(RuntimeError): """Raised when an A2A resume transitions to 'working' without echoing the client's continuityToken, indicating the remote rehydrated from a stale checkpoint (or from nothing) rather than continuing execution."""
def resume_task( remote_resume_fn, task_id: str, context_id: str, continuity_token: str, message_parts: list, max_gather_latency_s: float, observed_gather_latency_s: float, ) -> dict: # Guard 1: gather latency vs. the shortest plausible remote suspension TTL. # We cannot read the TTL from the AgentCard; 30s is the empirical floor for # hosted runtimes. Beyond it we must not assume continuation. if observed_gather_latency_s > max_gather_latency_s: raise ContinuityGapError( f"gather latency {observed_gather_latency_s:.1f}s exceeds " f"continuity budget {max_gather_latency_s:.1f}s for task {task_id}; " f"remote execution context may have been evicted" )
task = remote_resume_fn( taskId=task_id, contextId=context_id, message={"role": "user", "parts": message_parts, "metadata": {"continuityToken": continuity_token}}, )
# Guard 2: the resume must land in 'working' *and* echo the token. state = task.get("status", {}).get("state") echoed = ( task.get("status", {}) .get("message", {}) .get("metadata", {}) .get("continuityToken") ) if state == "working" and echoed != continuity_token: # Remote accepted the resume but did not prove it retained context. # Treat as fresh execution: quarantine, do not trust the result. raise ContinuityGapError( f"task {task_id} resumed to 'working' without continuity token " f"(echoed={echoed!r}); remote likely rehydrated a stale checkpoint " f"and may replay non-idempotent tool calls" )
# Guard 3: a canceled task must never resurrect to 'working'. if task.get("status", {}).get("state") == "working" and task.get("canceledAt"): raise ContinuityGapError( f"task {task_id} transitioned canceled -> working; " f"resume raced a cancel and the remote violated terminality" )
return task