Codex Bridge

Bridge OpenAI Codex CLI sessions to MiraBridge for mobile monitoring and control

Codex Bridge connects OpenAI's Codex CLI to MiraBridge, enabling mobile monitoring and control of Codex sessions.

What It Does

The bridge is a bidirectional protocol translator that runs alongside Codex CLI on your machine:

Mobile -> Gateway (WebSocket) -> Codex Bridge -> Codex App Server -> Codex CLI

It translates between MiraBridge's WebSocket protocol and Codex's JSON-RPC 2.0 protocol.

Installation

npx @mirabridge/codex-bridge connect

The bridge authenticates with the Gateway via browser-based OAuth and connects to the local Codex App Server.

Key Features

  • Monitor Codex sessions from your phone in real-time
  • Send instructions to Codex through MiraBridge
  • Approve or reject tool executions from mobile
  • Full conversation sync across devices

Protocol Translation

| Direction | MiraBridge | Codex | |-----------|-----------|-------| | Mobile to Codex | ai_chat_stream | turn/start | | Codex to Mobile | item/agentMessage/delta | stream_token | | Codex to Mobile | turn/completed | stream_complete | | Codex to Mobile | requestApproval | tool_approval_required |

Next Steps