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

open4
main
GitHub fork: fix/pi-omo-tool-search
opened3d agobyWwuhaoyujerry
View on GitHubTwo-way sync enabledPR last imported 16h ago

OmO's builtin tool_search reports sourceInfo.path as <builtin:tool-search>, while T3's Pi MCP bridge recognizes only builtin:tool-search. The bridge consequently treats OmO's builtin as a replacement and changes optional T3 tools to direct exposure. In a real OmO session they remain registered but inactive and disappear from deferred tool search, blocking Browser, Device, and HTML tool calls.

Recognize both exact builtin identifiers. This restores existing deferred discovery without changing tool names, adding a user extension, or broadening trust to custom search extensions. Extend the existing discovery and permission tests for the OmO identifier.

Fixes #32322.

OmO and Pi context

OmO Native (omo-ai) is a standalone coding agent built on Senpi (@code-yeongyu/senpi), a Pi fork exposing Pi's extension and RPC interfaces. It runs here through T3 Code's existing Pi provider.

OmO Native is separate from oh-my-pi (omp), another Pi fork. Runtime verification for this report covers OmO 5.1.62 with Senpi 2026.11.5-1; omp was not tested.

Reproduction

  1. Run OmO as T3's Pi provider.
  2. Ask for mcp__t3-code__preview_status, or search for it with tool_search.
  3. Before this change, the call fails with Tool mcp__t3-code__preview_status is registered but inactive; OmO's builtin metadata reports <builtin:tool-search>.
  4. With this change, normal tool search finds the tool and OmO's lazy activation executes it.

Scope and contribution policy

This uses the small, focused obvious-bug exception in CONTRIBUTING.md: an exact builtin-identifier mismatch prevents an existing provider integration from exposing existing tools. It adds no capability, setting, or product default. Actual tool approvals, configured selectors, hidden aliases, and the rejection of custom search replacements remain intact.

Related: #17220, which introduced optional Pi tool discovery. No prior issue or maintainer approval is claimed.

Verification

  • vp test run packages/provider-pi/src/server/mcpExtensionSource.test.ts: baseline 27 passed; the extended discovery and permission cases failed before the production change; all 28 passed afterward.
  • vp run check:changed: format, lint, both knip checks, typechecks for nine affected packages, and 30 tests across two files passed.
  • Fresh real OmO SDK session, using its normal lazy-activation execution option: tool_search found mcp__t3-code__preview_status; Browser status, opening a dedicated tab, navigation, screenshot, and closing the tab succeeded.
  • The same real runtime successfully executed html_preview and html_render; the preview image was inspected before rendering.
  • device_list reached the server's existing disabled-access guard instead of failing as an inactive tool. Device UI remains unverified because Agent device access was disabled; no permission setting was changed.

This changes provider discovery rather than UI layout. The running parent session was not hot-patched. Editor diagnostics timed out for two files; the repository's affected-package compiler checks passed.

Written by GPT-6.1 Sol Fast using OmO/Senpi in T3 Code.

Fixes pingdotgg/t3code#32322

Checks

21 successful · 10 skipped
All checks passed
ce3f494
Synced from GitHub

No active review issues block the change restoring deferred discovery of optional T3 tools in the Pi integration.

No open issues 🎉

What changed in this PR

This PR restores deferred discovery of optional T3 tools in OmO’s Pi integration by recognizing its builtin tool-search identifier alongside Pi’s existing identifier. Custom search replacements remain excluded.

Changes:

  • Accept both exact builtin identifiers without changing tool names or exposure defaults.
  • Extend discovery and permission tests to cover both identifiers.
  • Make the test bridge’s tool-search source path configurable.
FileDescription
packages/​provider-pi/​src/​server/​mcpExtensionSource.tsRecognizes OmO’s <builtin:tool-search> identifier.
packages/​provider-pi/​src/​server/​mcpExtensionSource.test.tsCovers discovery and permission handling for both builtin identifiers.
packages/​provider-pi/​src/​server/​mcpBridge.testkit.tsAdds a configurable tool-search path for test fixtures.

Review effort: Balanced

Synced from GitHub

Approvability

Verdict: Approved at 0e17bf9

Macroscope's review found this PR approvable — Recognizes OmO's builtin tool search so existing MCP tools remain discoverable. The compatibility fix retains tool execution approvals and configured tool restrictions.

You can add or adjust custom eligibility rules. Learn more.

Synced from GitHub

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

External image Run configuration

External image Commits

Reviewing files that changed from the base of the PR and between 5f821314903e1a48ee5a9682cd8bfc3a17f97c26 and ce3f49472f787ec0787e5e1c7965800f4d3bf1f9.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The MCP bridge testkit can assign a configurable source path to tool_search, defaulting to builtin:tool-search. Native tool-search detection accepts both builtin:tool-search and <builtin:tool-search>. Tests cover discovery and permission behavior for both paths.

Changes: Pi tool-search path support

Layer / File(s)Summary
Tool-search source path configuration
packages/provider-pi/src/server/mcpBridge.testkit.ts
loadMcpBridge accepts an optional toolSearchPath and uses it for the tool_search source. When no path is provided, it uses builtin:tool-search. Existing availability, disabled, and permission conditions remain unchanged.
Built-in path recognition and coverage
packages/provider-pi/src/server/mcpExtensionSource.ts, packages/provider-pi/src/server/mcpExtensionSource.test.ts
Native tool-search detection recognizes builtin:tool-search and <builtin:tool-search>. Tests check discovery and no-confirmation behavior for both paths.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Possibly related PRs

  • pingdotgg/t3code#33308: Recognizes the same built-in tool-search source paths and tests discovery and permission behavior.
  • pingdotgg/t3code#27607: Changes approval handling so built-in tool_search can bypass confirmation.

Suggested reviewers: chrisb4096-alt

Merge Risk: External image Minimal · previous review 5f821

No merge-blocking issue is identified in the path-recognition change.

Pre-merge checks: Passed 4

Check nameStatusExplanation
Title checkPassedThe title clearly describes the main change: recognizing OmO’s built-in tool search in the Pi provider.
Linked Issues checkPassed#32322 requires the Pi bridge to recognize OmO’s exact <builtin:tool-search> path alongside builtin:tool-search, so optional tools remain deferred and discoverable. hasBuiltinToolSearch now acce…
Out of Scope Changes checkPassedAll changes support #32322. The bridge test-kit option supplies each builtin path to tests, and the expanded tests verify discovery and permission behavior. The production change only broadens recogni…
Description checkPassedThe description covers the problem, the change, the focused-fix scope, and verification results. It also reports limitations and identifies the model and harness used.
Full details: Linked Issues check

Explanation

#32322 requires the Pi bridge to recognize OmO’s exact &lt;builtin:tool-search&gt; path alongside builtin:tool-search, so optional tools remain deferred and discoverable. hasBuiltinToolSearch now accepts either path while still requiring the tool_search name. Tests exercise discovery, tool execution, and permission behavior with both identifiers. The change preserves the existing discovery path and does not add a user activation extension.

Full details: Out of Scope Changes check

Explanation

All changes support #32322. The bridge test-kit option supplies each builtin path to tests, and the expanded tests verify discovery and permission behavior. The production change only broadens recognition to the second exact builtin identifier; it does not accept custom search replacements or change tool names or approvals.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
External image Recent review info

External image Run configuration

External image Commits

Reviewing files that changed from the base of the PR and between b7257c35d76f6c59f4ec25ed3f93d4eaf6f5d822 and 5f821314903e1a48ee5a9682cd8bfc3a17f97c26.

External image Files selected for processing: 3

  • packages/provider-pi/src/server/mcpBridge.testkit.ts
  • packages/provider-pi/src/server/mcpExtensionSource.test.ts
  • packages/provider-pi/src/server/mcpExtensionSource.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Added 1 commit

  • fix(pi): expose T3 tools to OmO's builtin search11e79c6
Synced from GitHub

@juliusmarminge Hi, all the CI jobs are passed now. Anything else I need to do to remove the pr:gatefailed label? Thanks.

Added 3 commits

  • Merge branch 'main' into fix/pi-omo-tool-searchb7257c3
  • Merge branch 'main' into fix/pi-omo-tool-search5f82131
  • Merge branch 'main' into fix/pi-omo-tool-searchce3f494

Note

Written by gpt-6.1-sol on behalf of Maria

Verified in a real dev environment

verified unchanged head ce3f49472f787ec0787e5e1c7965800f4d3bf1f9 on linux using the real web app, repository Playwright, and /usr/bin/google-chrome. projects and threads were created through the app. provider turns used gpt-6.1-sol through the local proxy.

  • baseline github/main (e89abadaee): omo 5.1.62 / senpi 2026.11.5-1 found no matches for preview_status, including with the exact extension group. calling the registered tool returned "registered but inactive".
  • pr: the same query found five tools, including mcp__t3-code__preview_status. omo executed it through eval and received the server's normal status response.
  • omo also discovered and executed preview_open, opened an agent-owned background tab, read the real app pairing page with preview_snapshot, and closed only that tab.
  • neighboring behavior: omo read package.json successfully. a separate codex gpt-6.1-sol turn read the file and successfully called both orchestrator_capabilities and preview_status.
  • blacksmith: all 29 existing bridge tests passed. this head reports 31 successful ci checks, zero failing or pending. no source changes or pushes were needed.

short command and runtime transcript

main: identical search finds no tools and execution reports inactive

pr: discovery returns five tools and preview_status executes

pr: recorded app results for discovery, background browser opening, snapshot, and close

Not verified

native desktop, ios/android, device execution, html tools, and older pi runtimes were not exercised. browser verification reached the pairing page; it did not authenticate that separate preview tab.

omo's first eval attempts sometimes returned Unhandled kernel message: [object Object]; retries succeeded. empty group filters also returned no matches, so both baseline and pr used the exact pi-t3-mcp-extension group. this verifies the identifier fix, not those separate runtime behaviors.