main
John Lauer Fix Codex Store agreement flags and recover transient launch observations; test on crr 9fee13e 1mo ago

name: codex-desktop-bridge description: Use when installing, authenticating or communicating with Codex Desktop through the compiled Rust AB bridge, including native plugins, conversations and desktop-specific tools on a selected Windows host.

Parent skill: codex-adom.

Codex Desktop Bridge

Read adom/codex docs/DESKTOP-BRIDGE.md and installed AB SDK/runtime skills before deployment. Source is bridge/ in adom/codex, not AB core. Preserve development pins.

  1. Run adom-codex context, discover targets, and pass --target and --ai-thread on every call. Current test host is crr (ConfRoomROG). arav-rog is in use by Caleb; do not use it for testing. Never silently use AdomLapper.
  2. Call codex_status and codex_describe. Store ID 9PLM9XGG6VKS is now ChatGPT and includes Codex. acceptAgreements:true requires actual user acceptance of BOTH Store source and package agreements for the selected target. In bridge 0.1.2+, it supplies both WinGet flags. Inspect installer.args, exitCode, stdout and stderr. An install_verification_failed result retains installer output; check status before retrying because the package may be installed.
  3. Reuse only a user-authorized staged native cache via codex_auth_import. Never print tokens. Preserve existing credentials, remove staging promptly, and verify account plus the visible app. Native login is the fallback. Before clicking Finish setup or another step expected to trigger UAC, send AB notify_user on the same target/caller: title "Codex setup needs your approval", body "A Windows administrator (UAC) prompt is coming for Codex setup. Please approve the native Windows prompt for OpenAI's Codex/ChatGPT app to continue.", level warning, durationLong true, and focus {hwnd} for the discovered desktop window (or {app:"ChatGPT"} before launch). codex_describe/status/install/open provide this payload as _beforeUac. Send the toast BEFORE elevation, while the normal desktop is still visible; also tell the user in chat because Focus Assist may hide the banner. Wait for actual native UAC approval, then verify the main app. Toast clicks/acknowledgments are not UAC approval. Do not re-trigger UAC or warn of an upcoming prompt when setup is already complete, and never auto-approve or bypass the secure desktop.
  4. Poll every job with codex_progress; inspect nested result.success. After timeout inspect state before resubmitting a mutation.
  5. codex_desktop_tools / codex_desktop_tool_call talk to the actual desktop. Discover schemas and native thread IDs. Select desktopPipe when ambiguous; rediscover after restart. Native tool instructions and approvals still apply.
  6. codex_connect is a separate bridge-owned app-server on Windows, sharing auth/config but not live desktop sessions. Do not misrepresent its results as desktop changes or resume desktop-owned active threads through this backend.
  7. Inspect codex_requests and obtain authorization before codex_request_reply. Never automatically approve execution, OAuth, interstitials, schedules or voice.
  8. Discover plugins with bounded query/limit/cursor, read details, install, poll, then read back. Connected apps may still require the user's authentication.
  9. codex_state observes via background AB capture. Verify native results and actual screenshots; a navigation acknowledgment is not visible proof.
  10. Desktop removal requires confirm:true, disconnect and normal app quit, including tray. It preserves Codex home. AB bridge removal is separate and must not remove desktop, sign-in, plugins or projects.