{
  "schema_version": "1.3.0",
  "slug": "when-must-an-a2a-v1-0-client-treat-a-task-as-terminal-despite-a-still-open-sse-artifact-stream",
  "title": "When must an A2A v1.0 client treat a task as terminal despite a still-open SSE artifact stream?",
  "date_of_record": "2026 November 6",
  "scope": "Applies to A2A v1.0 clients consuming `tasks/sendSubscribe` (SSE) and `tasks/resubscribe` streams where artifact chunks are delivered as `TaskArtifactUpdateEvent` frames and task state transitions arrive as `TaskStatusUpdateEvent` frames. Does not apply to synchronous `tasks/send` (non-streaming) calls, nor to `tasks/get` polling, where terminality is determined solely by the returned `Task.status.state`.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-a2a-v1-0-client-treat-a-task-as-terminal-despite-a-still-open-sse-artifact-stream.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-a2a-v1-0-client-treat-a-task-as-terminal-despite-a-still-open-sse-artifact-stream.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-a2a-v1-0-client-treat-a-task-as-terminal-despite-a-still-open-sse-artifact-stream.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1439,
    "python_slice_tokens": 263,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The A2A v1.0 stream is *two interleaved event channels over one HTTP response*: artifact deltas (`TaskArtifactUpdateEvent`) and lifecycle transitions (`TaskStatusUpdateEvent`). They are not causally ordered with respect to each other. A `TaskArtifactUpdateEvent` with `lastChunk: false` is a *promise of more data*, not a *claim that the task is alive*. The ta...",
    "what_was_observed": "In a multi-agent orchestration deployment (planner agent delegating to a codegen agent over A2A v1.0), the client observed the following frame sequence on a single SSE response: The stream closed cleanly after the `final:true` status event. The client's artifact assembler, which had buffered `a-1` awaiting a `lastChunk:true` frame that never arrived, emitted the artifact as *incomplete but valid-looking* Python (`def...",
    "condition_of_validity": "The rule \"terminal status implies artifact-stream closure is safe to treat as completion\" holds **only** when both of the following are true: 1. The terminal `TaskStatusUpdateEvent` has `final: true` (or the transport closed after it), **and** 2. For every artifact referenced by the task, a `TaskArtifactUpdateEvent` with `lastChunk: true` was received *befor...",
    "decision_boundary": "The client crosses from \"still streaming\" to \"terminal, reconcile artifacts\" at the first `TaskStatusUpdateEvent` whose `state ∈ {completed, failed, canceled, rejected}` — regardless of whether `final:true` is set. `final:true` is a *transport hint* (no further frames will arrive on this stream); the *state* is the lifecycle truth. A well-behaved server sets...",
    "operational_effect": "Downstream consumers must be gated on artifact *completeness*, not task *terminality*. In the deployment above, the fix was a per-artifact state machine (`OPEN → COMPLETE | ABANDONED`) that the build step consulted before reading artifact bytes. The effect is that a `failed` task now yields zero build attempts on abandoned artifacts and one build attempt on ..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "composition_edges": {
    "primary_domain": "epistemic_provenance_and_federation_routing",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/according-to-what-precedence-hierarchy-must-an-instance-resolve-contradictory-directives-across-system-developer-and-user-tiers.md",
      "https://corpusfetch.com/c/how-should-an-instance-decide-that-a-stored-conclusion-has-gone-stale-without-a-new-observation.md"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/by-what-checkpoint-and-compaction-boundaries-must-an-instance-externalize-working-state-to-prevent-context-window-drift-and-truncation-amnesia.md",
      "https://corpusfetch.com/c/across-what-additive-schema-and-unknown-field-preservation-boundaries-must-an-instance-evolve-wire-contracts-to-prevent-rolling-deploy-deserialization-crashes.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/how-can-an-instance-capture-implicit-user-preferences-without-storing-private-data.md",
      "https://corpusfetch.com/c/how-can-an-instance-compress-long-reasoning-traces-into-binding-conclusions.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "443a786a1f26f35e862e0c8b1b11930fb90d415ebd24cce014c3ca4a670e8727",
    "verified_classes": [
      "ArtifactAbandonedError",
      "ArtifactState",
      "ArtifactTracker"
    ],
    "verified_functions": [
      "on_artifact_update",
      "on_status_update",
      "require_complete",
      "complete_artifacts"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ArtifactAbandonedError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
