Skip to content

Wire SubscribeToTask into the TUI #108

Description

@alDuncanson

SubscribeToTask is implemented in the service layer and exposed as handler task resubscribe, but the TUI never calls it. A TUI user who loses a connection, or who wants to attach to a task started elsewhere, has no way back to a running task.

Where it stands

A2AService.resubscribe(task_id) exists and works. tui/server/tab.py does not reference it.

This is the last of the eleven spec methods missing from the TUI, which now covers SendMessage, SendStreamingMessage, GetTask, and CancelTask after #98.

The work

The turn layer added in #98 is the natural home. A resubscribe is a turn without an outgoing message: same streaming render, same cancel affordance, same settling rules. AgentTurn currently always sends — it would need to accept "attach to this task instead".

  • Extend the turn layer to drive a subscription as well as a send
  • TUI: reconnect to the saved task when a session resumes and the task is still open
  • Consider an explicit action for attaching to a task by id

Acceptance

  • Resuming a session with a running task reattaches and streams its remaining updates
  • Cancel works on a reattached task
  • A task that finished while disconnected settles immediately rather than hanging

Part of the A2A v1.0 parity work.


Context: Handler was audited against the A2A v1.0 specification after the v0.2.0 release. Method coverage at the time: service 7/11, CLI 7/11, TUI 4/11 (after #98), MCP 6/11. The four methods missing everywhere are ListTasks, ListTaskPushNotificationConfigs, DeleteTaskPushNotificationConfig, and GetExtendedAgentCard. A deterministic streaming test agent lives outside the repo at ~/code/handler-streaming-agent — it supports ask (input-required), slow (cancellable), and fail, and its card sets capabilities.streaming = true, which ADK does not do by default.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    a2a-parityClosing gaps against the A2A v1.0 specificationenhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions