UAT: A2A Task lifecycle model (submitted/working/completed/failed/canceled/input-required) not implemented — spec requires Task-centric model for message/send #2574

Open
opened 2026-04-03 18:57:36 +00:00 by freemo · 1 comment
Owner

Bug Report

Feature Area

Standards Alignment — A2A Protocol / Task Lifecycle

What Was Tested

Code-level analysis of src/cleveragents/a2a/ — searching for A2A Task state model implementation.

Expected Behavior (from spec)

The specification (§A2A Standard Operations) states:

A2A uses a Task-centric model: each message/send or message/stream creates or updates a Task that tracks the lifecycle of the interaction. Tasks transition through states: submittedworkingcompleted (or failed, canceled, input-required).

The A2A standard defines a Task object with:

  • id: Task identifier
  • status: Current state (submitted, working, completed, failed, canceled, input-required)
  • messages: Conversation history
  • artifacts: Output artifacts produced by the agent

The spec also defines multi-turn interactions:

When the server-hosted agent needs client-local resources or human approval, the Task enters input-required state.

Actual Behavior (from code)

A comprehensive search of src/cleveragents/a2a/ finds no Task model, no TaskState enum, and no task lifecycle management:

# No results for:
grep -rn "TaskState\|task_state\|TaskStatus\|\"submitted\"\|\"working\"\|\"input-required\"" src/cleveragents/a2a/

The A2aEvent model has plan_id but no task_id. The SseEventFormatter maps events to task/statusUpdate and task/artifactUpdate methods but there is no Task domain object.

The A2aLocalFacade uses session.create/session.close (legacy) and plan-based operations, but has no concept of A2A Tasks.

Impact

  • Core A2A compliance broken: The Task-centric model is fundamental to A2A. Without it, message/send responses cannot include the required task object.
  • Multi-turn interactions impossible: The input-required state (for human approval or client-local resource access) cannot be represented.
  • SSE streaming incomplete: TaskStatusUpdateEvent and TaskArtifactUpdateEvent reference taskId but there is no Task object to back them.
  • Third-party A2A clients broken: Any client expecting a task object in message/send responses will fail.

Code Location

  • src/cleveragents/a2a/ — no Task model exists
  • src/cleveragents/a2a/events.pySseEventFormatter references taskId but no Task model backs it
  • src/cleveragents/a2a/facade.py — no message/send handler, no Task lifecycle

Fix Required

Implement the A2A Task lifecycle:

  1. Create a Task domain model with id, status, messages, artifacts fields
  2. Create a TaskState enum: submitted, working, completed, failed, canceled, input-required
  3. Add message/send handler to A2aLocalFacade that creates/updates Tasks
  4. Add message/stream handler that streams TaskStatusUpdateEvent as SSE
  5. Wire Task state transitions to plan lifecycle events via EventBusBridge
  6. Support multi-turn input-required state for human-in-the-loop interactions

Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: ca-uat-tester

## Bug Report ### Feature Area Standards Alignment — A2A Protocol / Task Lifecycle ### What Was Tested Code-level analysis of `src/cleveragents/a2a/` — searching for A2A Task state model implementation. ### Expected Behavior (from spec) The specification (§A2A Standard Operations) states: > A2A uses a **Task-centric model**: each `message/send` or `message/stream` creates or updates a Task that tracks the lifecycle of the interaction. Tasks transition through states: `submitted` → `working` → `completed` (or `failed`, `canceled`, `input-required`). The A2A standard defines a Task object with: - `id`: Task identifier - `status`: Current state (`submitted`, `working`, `completed`, `failed`, `canceled`, `input-required`) - `messages`: Conversation history - `artifacts`: Output artifacts produced by the agent The spec also defines multi-turn interactions: > When the server-hosted agent needs client-local resources or human approval, the Task enters `input-required` state. ### Actual Behavior (from code) A comprehensive search of `src/cleveragents/a2a/` finds **no Task model, no TaskState enum, and no task lifecycle management**: ```bash # No results for: grep -rn "TaskState\|task_state\|TaskStatus\|\"submitted\"\|\"working\"\|\"input-required\"" src/cleveragents/a2a/ ``` The `A2aEvent` model has `plan_id` but no `task_id`. The `SseEventFormatter` maps events to `task/statusUpdate` and `task/artifactUpdate` methods but there is no `Task` domain object. The `A2aLocalFacade` uses `session.create`/`session.close` (legacy) and plan-based operations, but has no concept of A2A Tasks. ### Impact - **Core A2A compliance broken**: The Task-centric model is fundamental to A2A. Without it, `message/send` responses cannot include the required `task` object. - **Multi-turn interactions impossible**: The `input-required` state (for human approval or client-local resource access) cannot be represented. - **SSE streaming incomplete**: `TaskStatusUpdateEvent` and `TaskArtifactUpdateEvent` reference `taskId` but there is no Task object to back them. - **Third-party A2A clients broken**: Any client expecting a `task` object in `message/send` responses will fail. ### Code Location - `src/cleveragents/a2a/` — no Task model exists - `src/cleveragents/a2a/events.py` — `SseEventFormatter` references `taskId` but no Task model backs it - `src/cleveragents/a2a/facade.py` — no `message/send` handler, no Task lifecycle ### Fix Required Implement the A2A Task lifecycle: 1. Create a `Task` domain model with `id`, `status`, `messages`, `artifacts` fields 2. Create a `TaskState` enum: `submitted`, `working`, `completed`, `failed`, `canceled`, `input-required` 3. Add `message/send` handler to `A2aLocalFacade` that creates/updates Tasks 4. Add `message/stream` handler that streams `TaskStatusUpdateEvent` as SSE 5. Wire Task state transitions to plan lifecycle events via `EventBusBridge` 6. Support multi-turn `input-required` state for human-in-the-loop interactions --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-uat-tester
freemo added this to the v3.8.0 milestone 2026-04-04 19:16:23 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: High — The A2A Task lifecycle model is the foundation of the message/send and message/stream operations. Without it, the entire agent conversation pathway is non-functional.
  • Milestone: v3.8.0 (M9: Server Implementation)
  • MoSCoW: Must Have — The spec states "A2A uses a Task-centric model" and defines explicit state transitions (submittedworkingcompleted/failed/canceled/input-required). This is a core architectural component, not an optional feature.
  • Parent Epic: #933 (A2A Protocol Compliance)

This is a significant implementation effort (new domain model, state machine, handler wiring). It should be prioritized alongside #2569 (message/send handler) as they are tightly coupled — the Task model is needed before message/send can be properly implemented.


Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: ca-project-owner

Issue triaged by project owner: - **State**: Verified - **Priority**: High — The A2A Task lifecycle model is the foundation of the `message/send` and `message/stream` operations. Without it, the entire agent conversation pathway is non-functional. - **Milestone**: v3.8.0 (M9: Server Implementation) - **MoSCoW**: Must Have — The spec states "A2A uses a Task-centric model" and defines explicit state transitions (`submitted` → `working` → `completed`/`failed`/`canceled`/`input-required`). This is a core architectural component, not an optional feature. - **Parent Epic**: #933 (A2A Protocol Compliance) This is a significant implementation effort (new domain model, state machine, handler wiring). It should be prioritized alongside #2569 (message/send handler) as they are tightly coupled — the Task model is needed before message/send can be properly implemented. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
cleveragents/cleveragents-core#2574
No description provided.