The best way to control Claude Code, Codex and more from any computer or phone
fix(server): label Copilot rg calls as file searches (#38512)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Julius Marminge <julius0216@outlook.com>
Alex Vallone committed
Nov 18, 2026 at 01:45 UTC
d0a754daeaa972101881befe74a6f99e24e25da7
2 files changed
+6
-6
apps/server/src/orchestration-v2/Adapters/AcpRegistryAdapterV2.test.ts
+5
-5
@@ -1997,9 +1997,9 @@ describe("AcpRegistryAdapterV2", () => {
1997
}).pipe(Effect.provide(layerTest)),
1998
);
1999
2000
- // Copilot flattens MCP titles and reports kind "read" for MCP calls and glob; its native
2001
- // tool.execution_start event carries the real identity.
2002
- it.effect("keeps Copilot's MCP and search tool identity instead of calling them file reads", () =>
2000
+ // Copilot flattens MCP titles and reports kind "read" for MCP calls and glob ("other" for rg);
2001
+ // its native tool.execution_start event carries the real identity.
2002
+ it.effect.each(["glob", "rg"])("keeps Copilot's MCP and %s identity", (toolName) =>
2003
Effect.gen(function* () {
2004
const sessionId = "copilot-session";
2005
const executionStart = (data: Record<string, unknown>) => ({
@@ -2058,7 +2058,7 @@ describe("AcpRegistryAdapterV2", () => {
2058
}),
2059
executionStart({
2060
toolCallId: "native-search",
2061
- toolName: "glob",
2061
+ toolName,
2062
toolTitle: "Finding files",
2063
arguments: { pattern: "*.ts", paths: ["/workspace"] },
2064
}),
@@ -2066,7 +2066,7 @@ describe("AcpRegistryAdapterV2", () => {
2066
sessionUpdate: "tool_call",
2067
toolCallId: "native-search",
2068
title: "Finding files matching *.ts",
2069
- kind: "read",
2069
+ kind: toolName === "rg" ? "other" : "read",
2070
status: "completed",
2071
rawInput: { pattern: "*.ts", paths: ["/workspace"] },
2072
locations: [{ path: "/workspace" }],
packages/provider-acp-registry/src/server/copilotAcp.ts
+1
-1
@@ -69,7 +69,7 @@ type CopilotToolIdentity =
69
| { readonly kind: "mcp"; readonly server: string; readonly tool: string }
70
| { readonly kind: "search" };
71
72
-const COPILOT_SEARCH_TOOLS = new Set(["glob", "grep"]);
72
+const COPILOT_SEARCH_TOOLS = new Set(["glob", "grep", "rg"]);
73
74
interface CopilotSessionAttribution {
75
delta: { readonly kind: string; readonly text: string; readonly task?: string } | undefined;