diff --git a/server/src/__tests__/agent-conversations.test.ts b/server/src/__tests__/agent-conversations.test.ts index 58a3982506a..0b57f4de63e 100644 --- a/server/src/__tests__/agent-conversations.test.ts +++ b/server/src/__tests__/agent-conversations.test.ts @@ -1005,6 +1005,12 @@ describe("chat prompt policy", () => { expect(prompt).toContain("//agents//runs/"); }); + 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 3f5cd5c5ed7..5ff0d7b32f2 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 an execution run, link //agents//runs/ using the run's returned agentId and id. Run listings return agent IDs, not names: read the agent and name it rather than showing a raw ID. +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 an execution run, link //agents//runs/ using the run's returned agentId and id. Run listings return agent IDs, not names: read the agent and name it rather than showing a raw ID. 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.