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:

  1. **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.
  2. **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:

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`.

  1. **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.
  2. **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.
  3. **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.
  4. **`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:

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**:

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