Skip to content

[Bug]: v0.3 REST compatibility exposes GET /v1/tasks but ListTasks is still unimplemented #1043

@liujuanjuan1984

Description

@liujuanjuan1984

Problem

The SDK's v0.3 REST compatibility layer currently exposes GET /v1/tasks, but the actual handler REST03Handler.list_tasks() still raises NotImplementedError. This makes it appear that v0.3 REST ListTasks is available when requests to that route will fail at runtime.

This is not a missing ListTasks capability overall: the core ListTasks method already exists in the SDK, and #515 is closed. The gap is specifically in the compat/v0_3 REST adapter layer.

Evidence

  1. REST03Adapter.routes() registers ('/v1/tasks', 'GET'):
    https://github.com/a2aproject/a2a-python/blob/main/src/a2a/compat/v0_3/rest_adapter.py

  2. But REST03Handler.list_tasks() is still unimplemented:
    https://github.com/a2aproject/a2a-python/blob/main/src/a2a/compat/v0_3/rest_handler.py

    The current implementation is:
    raise NotImplementedError('list tasks not implemented')

  3. The existing test suite also codifies this behavior as the current state:
    https://github.com/a2aproject/a2a-python/blob/main/tests/compat/v0_3/test_rest_handler.py

    test_list_tasks asserts that rest_handler.list_tasks(...) raises NotImplementedError.

Relation To Existing Issues

Impact

For downstream SDK consumers, this creates a subtle compatibility gap:

  • REST03Adapter advertises GET /v1/tasks
  • but requests fail in the compat handler
  • so it is difficult to safely reuse the SDK's advertised 0.3 compatibility in a dual-stack REST ingress

In practice, downstream consumers are forced to choose between:

  • explicitly returning 501 for 0.3 REST GET /v1/tasks, or
  • implementing their own extra 0.3 REST ListTasks translation layer

Both indicate that the SDK currently has a real gap here.

Expected Behavior

The compat/v0_3 REST layer should be consistent with the rest of the compat surface and do at least one of the following:

  1. Implement REST03Handler.list_tasks() so GET /v1/tasks is correctly mapped to the existing ListTasks core capability and returns a payload that matches v0.3 compatibility expectations; or
  2. If this is intentionally unsupported for now, do not expose the route from REST03Adapter.routes(), so the SDK does not advertise a route that is guaranteed to fail.

Suggested Direction

Prefer implementing the route, because:

  • core ListTasks already exists
  • other compat/v0_3 REST task methods already provide a translation pattern
  • the current test already locks in the unimplemented behavior, so a fix can be accompanied by a clear test update from pytest.raises(NotImplementedError) to a successful translation assertion

Metadata

Metadata

Assignees

Labels

component: serverIssues related to frameworks for agent execution, HTTP/event handling, database persistence logic.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions