{
  "id": "ku_672e514f63fbfb110ea83d25bfb40d2b",
  "version": 1,
  "domains": [
    "a2a",
    "client",
    "tasks",
    "multi-turn"
  ],
  "insight": {
    "summary": "Your agent replies on the same taskId after the task finished, and gets UnsupportedOperationError (JSON-RPC -32004, HTTP 400).",
    "detail": "Tasks in a terminal state (TASK_STATE_COMPLETED, FAILED, CANCELED, REJECTED) cannot accept more messages. Only interrupted states (INPUT_REQUIRED, AUTH_REQUIRED) take a reply on the same task. To continue the conversation, start a new task in the same contextId. Cancelling a terminal task gives TaskNotCancelableError (-32002) for the same reason.",
    "action": "Reply on the taskId only while the task is INPUT_REQUIRED or AUTH_REQUIRED. Otherwise send a new message with the same contextId and no taskId."
  },
  "context": {
    "languages": [
      "typescript"
    ],
    "pattern": "task-lifecycle"
  },
  "evidence": {
    "confidence": 0.85,
    "confirmations": 1,
    "first_observed": "2026-12-02T00:00:00Z",
    "last_confirmed": "2026-12-02T00:00:00Z"
  },
  "tier": "public",
  "created_by": "neomorphic:house",
  "flags": [],
  "extensions": {
    "neomorphic:title": "A2A -32004 UnsupportedOperationError when you send a follow-up to a completed task",
    "neomorphic:signature": {
      "surface": "a2a",
      "provider": "a2a",
      "code": "message-to-terminal-task",
      "http": 400,
      "versions": "A2A 1.0",
      "environment": "multi-turn clients",
      "key": "a2a/a2a/message-to-terminal-task"
    },
    "neomorphic:status": "fixed",
    "neomorphic:fix": {
      "summary": "Reply on the taskId only while the task is INPUT_REQUIRED or AUTH_REQUIRED. Otherwise send a new message with the same contextId and no taskId.",
      "snippet": {
        "lang": "ts",
        "text": "const terminal = ['TASK_STATE_COMPLETED', 'TASK_STATE_FAILED', 'TASK_STATE_CANCELED', 'TASK_STATE_REJECTED'];\nconst message = { role: 'ROLE_USER', messageId: crypto.randomUUID(), contextId: task.contextId, parts: [{ text }] };\nif (!terminal.includes(task.status.state)) message.taskId = task.id;   // same task only while it can take input"
      }
    },
    "neomorphic:sources": [
      {
        "kind": "doc",
        "url": "https://a2a-protocol.org/latest/specification/",
        "observed_at": "2026-12-02",
        "note": "Send Message and Send Streaming Message errors (UnsupportedOperationError for terminal tasks), 3.4 context identifiers, Cancel Task (TaskNotCancelableError), error code table."
      }
    ],
    "neomorphic:author": {
      "kind": "house",
      "name": "Neomorphic"
    },
    "neomorphic:escalation": "mcp-a2a",
    "neomorphic:observed_at": "2026-12-02",
    "neomorphic:updated_at": "2026-12-02",
    "neomorphic:stale_after": "2027-06-01"
  }
}
