Skip to content

Unify Swift-backed Omi tool registration across agent runtimes #8461

Closed

Description

@Git-on-my-level

Problem

Swift-backed Omi tools are not owned by one canonical manifest across agent runtimes. A tool can exist in Swift and in one adapter path, while the active task agent does not advertise it.

This surfaced while implementing one-click Claude/ChatGPT cloud MCP setup: the prompt instructed the agent to call fill_cloud_connector_form, but the active pi-mono runtime did not include that tool even though another MCP path did. The agent correctly reported the tool was unavailable, then fell back to brittle browser/bash automation.

Current split-brain surfaces

  • desktop/macos/Desktop/Sources/Providers/ChatToolExecutor.swift executes Swift-backed tools.
  • desktop/macos/agent/src/omi-tools-stdio.ts declares tools for one MCP stdio path.
  • desktop/macos/pi-mono-extension/index.ts declares tools for the active pi-mono task-agent path.
  • desktop/macos/Desktop/Sources/LocalAgentAPIServer.swift declares local /v1/local/tools metadata.
  • Prompt text can reference tools independently of whether the active adapter advertises them.

Impact

  • Adding a tool is not one operation.
  • Active adapter choice changes the model-visible tool surface.
  • Tool names/counts can drift across MCP-prefixed and non-prefixed paths.
  • Prompts can instruct agents to use unavailable tools.
  • Debugging requires reading logs from multiple surfaces instead of inspecting one availability snapshot.

Acceptance criteria

  • One canonical manifest owns Swift-backed Omi tool name, description, schema, annotations, timeout, and adapter availability.
  • omi-tools-stdio, pi-mono extension tools, local /v1/local/tools, and generated prompt/tool docs derive from that manifest.
  • Startup logs include adapter id plus exact advertised tool names/count.
  • Tests fail if a prompt references a tool that is not advertised by the adapter used for that flow.
  • Tests fail if a Swift ChatToolExecutor tool is intended for agents but missing from any runtime manifest.
  • MCP-prefixed and non-prefixed names have explicit normalization/aliasing rules.
  • A running agent has a debuggable tool availability snapshot.

Notes

This is separate from the Claude/ChatGPT connector setup product work. For that flow, the app should own the deterministic happy path and use agents only as fallback.

Activity

  1. added
    p3
    docs-tooling
    and removed
    p3
    on Jul 2, 2026
  2. Git-on-my-level commented on Jul 14, 2026

    @Git-on-my-level
    MemberAuthor

    Parent/executor issue: #9688 — binds this issue and its siblings into one PR (Swift shadow-state census, bridge-lifecycle fuzzer, contract fixtures, adapter conformance, anti-regrowth guards) with per-child closure criteria. Sequenced after the PTT stability PR (post-#9660) to reuse its kernel-restore seam and fixture conventions.

  3. added a commit that references this issue on Jul 14, 2026
    fff4eef
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    desktopdocs-toolingp3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions