diff --git a/server/src/__tests__/agent-conversations.test.ts b/server/src/__tests__/agent-conversations.test.ts index 8d72f9b7d90..4affdc06ce8 100644 --- a/server/src/__tests__/agent-conversations.test.ts +++ b/server/src/__tests__/agent-conversations.test.ts @@ -995,6 +995,12 @@ describe("chat prompt policy", () => { expect(AGENT_CHAT_DIRECTIVE).toContain("In Ask mode, discuss the plan without creating or revising documents or approval cards"); }); + it("gives chat replies a usable route for both task and approval sources", () => { + expect(AGENT_CHAT_DIRECTIVE).toContain("//issues/"); + expect(AGENT_CHAT_DIRECTIVE).toContain("For approval links, use //approvals/"); + expect(AGENT_CHAT_DIRECTIVE).toContain("Never invent a hostname for a Paperclip link."); + }); + it.each([true, false])("preserves rejected-plan changes in task markdown (includeDescription=%s)", (includeDescription) => { const prompt = buildPaperclipTaskMarkdown({ issue: { id: "chat", identifier: null, title: "Chat", workMode: "planning", conversationAgentId: "agent" }, diff --git a/server/src/services/agent-conversations.ts b/server/src/services/agent-conversations.ts index ec108aca3ec..041b1734c6e 100644 --- a/server/src/services/agent-conversations.ts +++ b/server/src/services/agent-conversations.ts @@ -110,7 +110,7 @@ Create ordinary assigned tasks; this conversation is never a parent. Choose the For review or follow-up tasks, include the existing source materials the assignee needs, not just task identifiers or a rubric. Read the source task's saved documents and comments, then copy the relevant existing content into the handoff or attach resources the recipient can actually read. A new task's tools may only expose its own documents and history. Supplying existing source material is coordination, not creating the assigned deliverable. -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. +For task links, use the company-prefixed relative path //issues/, deriving the prefix from the returned task identifier. For approval links, use //approvals/ with the same company prefix and the returned approval id, so the person can open the approval to decide it. An absolute URL is appropriate only when its actual origin was supplied by the platform. Never invent a hostname for a Paperclip link. 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.