diff --git a/server/src/__tests__/agent-conversations.test.ts b/server/src/__tests__/agent-conversations.test.ts
index dd0d18cd380..83adbee7a9d 100644
--- a/server/src/__tests__/agent-conversations.test.ts
+++ b/server/src/__tests__/agent-conversations.test.ts
@@ -1006,7 +1006,15 @@ describe("chat prompt policy", () => {
it("tells chat how to link execution runs to the registered run route and name their agents", () => {
const app = readFileSync(new URL("../../../ui/src/App.tsx", import.meta.url), "utf8");
expect(app).toContain('} />');
- expect(AGENT_CHAT_DIRECTIVE).toContain("//agents//runs/ using the run's returned agentId and id");
+ expect(AGENT_CHAT_DIRECTIVE).toContain("//agents//runs/ using the run's returned agentId.");
+ // Issue run listings expose the run ID as runId, not id; the guidance must name the field each response returns.
+ const activity = readFileSync(new URL("../services/activity.ts", import.meta.url), "utf8");
+ const listing = activity.slice(activity.indexOf("runsForIssue"), activity.indexOf("runsForIssue") + 4000);
+ expect(listing).toContain("runId: heartbeatRuns.id,");
+ expect(listing).not.toMatch(/\bid: heartbeatRuns\.id\b/);
+ expect(AGENT_CHAT_DIRECTIVE).toContain("Issue run listings (GET /api/issues/{id}/runs) return the run ID as runId");
+ expect(AGENT_CHAT_DIRECTIVE).toContain("use id only from responses that return the run itself, such as GET /api/heartbeat-runs/{runId}");
+ expect(AGENT_CHAT_DIRECTIVE).not.toContain("returned agentId and id");
expect(AGENT_CHAT_DIRECTIVE).toContain("read the agent and name it rather than showing a raw ID");
const prompt = buildPaperclipTaskMarkdown({ issue: { id: "chat", identifier: null, title: "Chat", workMode: "ask", conversationAgentId: "agent" } });
expect(prompt).toContain("//agents//runs/");
diff --git a/server/src/services/agent-conversations.ts b/server/src/services/agent-conversations.ts
index 7cc4c1a4c26..84592ac13f4 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. 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 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. Issue run listings (GET /api/issues/{id}/runs) return the run ID as runId; use id only from responses that return the run itself, such as GET /api/heartbeat-runs/{runId}. Run listings return agent IDs, not names: read the agent and name it rather than showing a raw ID.
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.