From 5324cfc4df5ed5f0f5dcdc584382d2274b25843e Mon Sep 17 00:00:00 2001 From: Dotta Date: Sat, 7 Nov 2026 13:28:00 -0600 Subject: [PATCH] fix(chat): link the profile of an agent chat acted on Chat guidance defined only the task-link template. Asked to resume an agent, the chat agent resumed it and reported the result but never linked the agent, leaving the person no direct route to check its saved availability. Tell chat to link an affected agent's profile at //agents/, and keep that link distinct from an agent:// mention, which notifies the agent. Co-Authored-By: Claude Opus 5.5 --- server/src/__tests__/agent-conversations.test.ts | 7 +++++++ server/src/services/agent-conversations.ts | 2 ++ 2 files changed, 9 insertions(+) diff --git a/server/src/__tests__/agent-conversations.test.ts b/server/src/__tests__/agent-conversations.test.ts index 8d72f9b7d90..9e872245cb0 100644 --- a/server/src/__tests__/agent-conversations.test.ts +++ b/server/src/__tests__/agent-conversations.test.ts @@ -986,6 +986,13 @@ describe("conversation execution wake policy", () => { }); describe("chat prompt policy", () => { + it("tells chat to link the profile of an agent it acted on without turning the link into a wake mention", () => { + expect(AGENT_CHAT_DIRECTIVE).toContain("link its profile at //agents/"); + expect(AGENT_CHAT_DIRECTIVE).toContain("use agent:// only when you intend to notify that agent"); + const prompt = buildPaperclipTaskMarkdown({ issue: { id: "chat", identifier: null, title: "Chat", workMode: "ask", conversationAgentId: "agent" } }); + expect(prompt).toContain("//agents/"); + }); + it("preserves explicit plan approval while avoiding ritual confirmations for ordinary chat", () => { expect(AGENT_CHAT_DIRECTIVE).toContain("When the user asks to approve a plan before handoff"); expect(AGENT_CHAT_DIRECTIVE).toContain('interactionKind: "confirmation"'); diff --git a/server/src/services/agent-conversations.ts b/server/src/services/agent-conversations.ts index ec108aca3ec..f235ec7d7fe 100644 --- a/server/src/services/agent-conversations.ts +++ b/server/src/services/agent-conversations.ts @@ -112,6 +112,8 @@ For review or follow-up tasks, include the existing source materials the assigne For task links, use the company-prefixed relative path //issues/, deriving the prefix from the returned task identifier. An absolute URL is appropriate only when its actual origin was supplied by the platform. Never invent a hostname for a Paperclip link. +When a reply concerns a specific agent, such as one you paused, resumed, configured, or reported on, link its profile at //agents/ using the agent's returned urlKey or id. A profile link is not a mention: use agent:// only when you intend to notify that agent. + For status updates, distinguish recorded task status from active execution and verified progress. Read the latest relevant comments and run outcome before explaining a blocker or claiming work is underway. Use the advertised API tools for another task's details when needed. A completed dependency does not prove a block is stale; report the assignee's recorded reason. Agent configuration may be redacted: an empty configuration object without configuration-read permission does not prove settings are disabled or at their defaults. If the evidence is unavailable, say what you could verify and what remains unknown rather than guessing or recommending a status change. Keep discussion here and leave the conversation available for the next message. Link handed-off tasks in your reply; do not make this conversation blocked by their completion or wait for them. Paperclip will bring completed handed-off tasks back as a new input here so you can explain the result and link it without another user message. After creating an assigned task, let its own run execute the work; do not create its deliverables or change its execution status from this chat. Reply normally and end your turn; Paperclip manages the conversation waiting state. Do not change its status, create a review confirmation just to finish a reply, mark it complete, or poll for another reply. An accepted plan authorizes handoff to execution tasks, never implementation on this conversation. Honor normal approvals. Ask mode is non-mutating. Plan mode supports research and writing/revising the plan; hand off for execution only through the normal authorized workflow.`;