@devries-cameron20 / t3code-1 / commits / 1e38ebb71b
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix(pi): recognize OmO's builtin tool search (#32321)

Co-authored-by: Jerry Wu <haoyuwu@andrew.cmu.edu> Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com> Co-authored-by: Julius Marminge <julius0216@outlook.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Haoyu(Jerry) Wu committed Nov 14, 2026 at 20:38 UTC 1e38ebb71b7ccf25d9aed83f03d80354489c3ef1
2 files changed +9 -4
packages/provider-pi/src/server/mcpExtensionSource.test.ts
+6 -3
@@ -387,9 +387,12 @@ describe("Pi tool discovery permissions", () => {
387 },
388 },
389 };
390 - assert.isUndefined(
391 - await toolCall!({ toolName: "tool_search", input: { query: "preview_snapshot" } }, ctx),
392 - );
390 + for (const builtinPath of ["builtin:tool-search", "<builtin:tool-search>"]) {
391 + searchPath = builtinPath;
392 + assert.isUndefined(
393 + await toolCall!({ toolName: "tool_search", input: { query: "preview_snapshot" } }, ctx),
394 + );
395 + }
396 assert.equal(confirmations.length, 0);
397 const result = await toolCall!({ toolName: "mcp__t3-code__preview_snapshot", input: {} }, ctx);
398 assert.equal(result?.block, true);
packages/provider-pi/src/server/mcpExtensionSource.ts
+3 -1
@@ -343,9 +343,11 @@ export default async function t3McpExtension(pi: ExtensionAPI) {
343 // keep their normal meaning without replacing or shadowing Pi's runtime.
344 // Only Pi's own search is known to be read-only. An extension that replaces
345 // it keeps the name, and cannot discover deferred tools either.
346 + // OmO reports Pi's builtin search with angle brackets around the same path.
347 + const BUILTIN_TOOL_SEARCH_PATHS = new Set(["builtin:tool-search", "<builtin:tool-search>"]);
348 const hasBuiltinToolSearch = () =>
349 typeof pi.getAllTools === "function" &&
348 - pi.getAllTools().some((tool) => tool.name === "tool_search" && tool.sourceInfo?.path === "builtin:tool-search");
350 + pi.getAllTools().some((tool) => tool.name === "tool_search" && BUILTIN_TOOL_SEARCH_PATHS.has(tool.sourceInfo?.path ?? ""));
351
352 const readOnlyMcpTools = new Set<string>();
353 const isReadOnlyMcpTool = (name: string) => {