Submatter/plans/Plan-workspace-communications/Epic-agent-participation/Task-agent-chat-run-delivery.md

2.2 KiB

kind slug title plan_slug epic_slug status priority tenant_id owner cursor_todo_id updated_at
task agent-chat-run-delivery Stream and finalize agent runs in chat workspace-communications agent-participation ready P1 global unassigned null 2026-10-22

Task summary

Project normalized harness events into direct/channel chat, persist final agent messages, and notify users of approvals, failure, cancellation, or completion.

Description

Consume the harness-neutral run event stream for a durable agent job. Broadcast ephemeral text/progress deltas from harness-owned events/checkpoints, render tool and approval cards, and atomically finalize one durable message linked to the agent version, run, source message, and workspace. Browser disconnects must not cancel worker execution or lose final output.

Subtasks

  • Consume harness-owned events/checkpoints and map them to versioned realtime chat projection events without creating a second checkpoint store.
  • Add UI reconciliation for text deltas, tool calls, approvals, cancellation, failure, and retry.
  • Finalize one durable agent-authored message and run linkage idempotently.
  • Produce unified notifications for approval-required, failed, cancelled, and completed outcomes.
  • Add disconnect/reconnect, duplicate event, finalization, and cross-tenant tests.

Owner or assignee

unassigned

Status

ready

Estimation

M

Acceptance criteria

  • Stream/final-response/notification delivery rechecks current workspace, context, conversation and scoped-agent grants; revoked access cannot receive payloads from an otherwise valid run.

  • The same delivery logic works for direct-agent and workspace-channel conversations.

  • Duplicate/reordered ephemeral events do not duplicate the final durable message.

  • Browser disconnect does not stop the job; reconnect restores checkpoint/final state.

  • Agent messages and notifications preserve agent version, run, source, and workspace audit linkage.

  • pnpm lint && pnpm type-check && pnpm test pass.

  • Epic: ./Epic-agent-participation.md
  • Plan: ../Plan-workspace-communications.md