--- kind: task slug: direct-agent-chat title: Chat directly with saved agents plan_slug: workspace-communications epic_slug: agent-participation status: ready priority: P1 tenant_id: global owner: unassigned cursor_todo_id: null updated_at: "2026-10-22" --- # Task summary Let users select an active saved agent in the AI Chat tab and start or resume a durable direct conversation with its pinned version and policies. ## Description Add an agent selector and persistent direct-agent conversations to Chat mode. Starting a conversation pins an agent version for reproducibility; updates may be adopted explicitly. Each send is workspace-authorized and enqueues through the durable job contract using the selected agent's policies. This task owns conversation authorization, version pinning, history, selection, and enqueueing—not harness execution, streaming projection, final-message persistence, or notifications. ## Subtasks - [ ] Add direct-agent conversation and membership/message linkage with generated migration and workspace-scoped API. - [ ] Add Chat-mode agent selector, new/resume conversation flows, and explicit version-update handling. - [ ] Enqueue messages through the durable job contract and expose stable conversation/source identifiers for the delivery layer. - [ ] Add tenant isolation, disabled-agent, version pinning, cancellation, and conversation-history tests. ## Owner or assignee `unassigned` ## Status `ready` ## Estimation `L` ## Acceptance criteria - [ ] Selection uses the canonical registry API; a same-workspace agent is not automatically usable or entitled to the user's other conversations/project objects. - [ ] Context reads/tools require scoped reviewed grants and current authority; creating a direct chat never silently grants private project/object access. Reuse durable message/author contracts rather than inventing agent identities. - [ ] Users can select only active agents they are authorized to use and can resume their own permitted conversations. - [ ] Every conversation and run pins an immutable agent version; updates never silently change an existing conversation. - [ ] Agent instructions, tool/context policy, budget, model role, and harness route are enforced server-side. - [ ] Conversation messages and enqueued jobs preserve workspace, pinned version, source, and audit linkage; streaming/tool/approval rendering is supplied by the shared delivery task. - [ ] `pnpm lint && pnpm type-check && pnpm test` pass. ## Links to related Epic / Plan - Epic: `./Epic-agent-participation.md` - Plan: `../Plan-workspace-communications.md`