Skip to content

Windows desktop: delegate tasks to coding agents (Claude Code, OpenClaw, Hermes, Codex) via ACP #9302

Closed

Description

@karthikyeluripati

The Windows app can only answer through Omi's hosted chat today. This adds the macOS agent runtime's adapter concept to desktop/windows/: a full ACP (Agent Client Protocol) JSON-RPC-over-stdio client with Claude Code built in (bundled @zed-industries/claude-agent-acp bridge, no CLI install) and OpenClaw / Hermes / Codex as user-connected external commands. Saying "ask codex to fix the failing test in my omi repo" (typed or push-to-talk) routes the task to the named agent and streams its progress into chat; if it fails to start, Omi falls back to the next connected agent; if it isn't connected, the reply explains how to install it (Settings → Agents has install cards + a real handshake Test). External agents run with a minimal allowlisted env and never get automatic permanent permission grants.

I'll split this into stacked PRs to make review easier: 1) adapter core, 2) routing/fallback/IPC, 3) settings UI, 4) docs + fixes found while demoing live.

Activity

  1. karthikyeluripati commented on Jul 21, 2026

    @karthikyeluripati
    ContributorAuthor

    Fair concern @ofekron — worth clarifying what the current implementation actually does: fallback is
    never silent. The chat stream emits an explicit agent-switch event, shows "X failed
    (reason) — trying the next agent…", and the reply header changes to "Y took over the
    task". Fallback also only triggers when the requested agent produced zero output, so a
    partially-answered task is never quietly re-run elsewhere.

    The stronger version of your point — asking before switching, or a saved fallback policy
    (auto / ask / never) — is a real product decision, and it sits in the same bucket as the
    ACP permission-policy question maintainers are already reviewing on #9304. If they want
    the conservative default, a per-user fallback policy is a small addition to the Settings →
    Agents PR in this stack. Run identity (provider, cwd, cost) is already carried per task in
    the result events.

  2. karthikyeluripati commented on Jul 23, 2026

    @karthikyeluripati
    ContributorAuthor

    Status wrap-up: PR 1/4 (#9304) merged, and the remaining planned slices have since landed
    on main directly via maintainer work built on that adapter core — now including OAuth
    sign-in, agent auto-detection, pi-mono, and packaged-agent smoke coverage, shipped in
    v1.0.2-windows. I've closed my fork-staged PRs 2–4 as superseded. One last gap from the
    #9304 review cycle (install-time verification of the optional claude.exe binary) is up as
    a small follow-up PR: #10399 . From my side this issue is complete.

  3. Git-on-my-level commented on Jul 29, 2026

    @Git-on-my-level
    Member

    Verifying this is resolved at HEAD (1ef0976).

    The Windows ACP coding-agent delegation described here is fully present in desktop/windows/:

    • ACP client core — src/main/codingAgent/acp.ts (AcpRuntimeAdapter): JSON-RPC-over-stdio client with streaming events, binding/attempt lifecycle, and cancellation.
    • Claude Code built-in (no CLI install) — src/main/codingAgent/claudeCode.ts:1-40: ClaudeCodeRuntimeAdapter spawns the bundled claude-acp-entry.mjs (running @agentclientprotocol/claude-agent-acp) via Electron's Node binary, redirected to the asar-unpacked twin so it runs packaged.
    • External adapters — src/main/codingAgent/codex.ts, hermes.ts, openclaw.ts: user-connected external ACP commands.
    • Routing + fallback — src/main/codingAgent/taskRunner.ts:118-234 (runCodingAgentTask): tries the named agent first, falls back through remaining connected agents only while the failing adapter produced no visible output (producedOutput guard at line 218), emitting an explicit "X failed (reason) — trying the next agent…" status event (line 224) and an agent_selected event with fallback: true.
    • Not-connected hint — src/main/codingAgent/adapterRegistry.ts:145-149 (adapterActivationError): renders "Install <agent> first, then add its launch command in Settings → Agents (or set <ENV_VAR>)."
    • Settings → Agents UI — src/renderer/src/components/settings/tabs/AgentsTab.tsx: install cards with PATH auto-detection, one-click Connect/Test handshake (testAgentConnection in taskRunner.ts:54-96 completes the ACP initialize handshake), Codex API-key management, and Claude OAuth sign-in/sign-out.
    • Allowlisted env / tool policy — src/main/codingAgent/toolPolicyStub.ts; agent config isolated to an Omi-owned dir (agentConfigDir.ts).

    Merged PRs: #9304 (adapter core, routing/fallback, settings UI) and #10399 (install-time verification of the optional claude.exe binary). The follow-up #10399 was the last open gap noted in the review wrap-up.

    Closing as resolved.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions