Done — I implemented it as a real OMP workspace package rather than extending the earlier protocol skeleton :3
The new package lives at:
packages/codex-bridge/
It installs an actual codex executable and uses OMP as the underlying agent engine.
What is implemented #
The bridge now supports:
codex --versionusing the version from your supplied Codex snapshot.- Codex app-server JSONL over stdin/stdout.
- WebSocket app-server over Unix-domain sockets.
- Loopback TCP WebSocket mode.
- Byte-transparent
codex app-server proxy. codex remote-control start,status, andstop.- Thread creation, resume, fork, list, read, rename, archive, delete, subscribe, and compaction.
- Turn start, steering, interruption, persistence, recovery, and completion.
- Streaming assistant text and reasoning.
- Native Codex
commandExecution,fileChange, andmcpToolCallitems. - Streaming command output.
- Aggregate file-diff notifications.
- Native command and file approval requests sent back to ChatGPT.
- “Accept for session” approval caching.
- User-input requests from OMP tools.
- OMP model discovery and configurable Codex-to-OMP model aliases.
- Direct OMP SDK embedding.
- OMP RPC-process fallback using
omp --mode rpc-ui. - A deterministic mock backend for development.
- Workspace-confined direct filesystem operations with canonical-path and symlink checks.
- A tracing wrapper for recording the exact ChatGPT desktop startup/protocol traffic.
The exact generated Codex protocol surface from your archive is included under:
vendor/codex-app-server-protocol/
The bridge runtime itself has no new npm dependencies.
Verification #
The release gate passed, including 15 tests covering:
- Initialization and discovery.
- Thread persistence and pagination.
- Text and reasoning streaming.
- Interrupting an active generation.
- Command approvals and output.
- File approvals and diffs.
- Direct OMP SDK event translation using an API-compatible deterministic SDK.
- OMP RPC JSONL translation using a deterministic process.
- WebSocket frame handling.
- A real HTTP WebSocket Upgrade over a Unix socket.
- Subprocess-level
codex app-serveroperation. - Clean exported-package retesting.
- Parseable
codex --version. - Unix-socket daemon start, status, and stop.
The exported archives were reopened, their members checked, the focused export was retested, and the published checksums were verified.
Downloads #
The focused package is the easiest place to start:
Download the focused OMP Codex bridge
The complete OMP source tree with the new workspace package and root script registration:
Download the patched Oh My Pi source tree
A compressed unified patch against your original OMP archive:
Supporting material:
Implementation report Final verification report Verification log SHA-256 checksums
Trying it locally #
Unpack the focused package and run:
cd omp-codex-bridge
npm test
node ./bin/codex.mjs doctor
Install the shim into ~/.local:
./scripts/install-local.sh "$HOME/.local"
Then verify that your SSH login shell sees it:
ssh your-host 'command -v codex; codex --version; codex doctor'
For the RPC backend, place this in the target account’s login environment, such as ~/.zprofile:
export OMP_CODEX_BACKEND=rpc
export OMP_CODEX_OMP_BIN="$HOME/.local/bin/omp"
For direct SDK embedding:
export OMP_CODEX_BACKEND=sdk
export OMP_CODEX_OMP_MODULE='@oh-my-pi/pi-coding-agent'
The default auto mode tries the SDK and falls back to the OMP executable.
A configuration example is included. The normal location is:
~/.omp/codex-bridge/config.json
For example:
{
"backend": "auto",
"defaultModel": "anthropic/claude-sonnet-4-5",
"modelAliases": {
"gpt-5.6-codex": "anthropic/claude-sonnet-4-5"
},
"defaultApprovalPolicy": "on-request",
"defaultReasoningEffort": "medium"
}
After SSH verification, add that SSH host in the ChatGPT desktop app and open a repository through it. A localhost SSH alias is sufficient when OMP and ChatGPT desktop are on the same machine.
Remaining real-world validation #
Two things cannot be reproduced inside this container:
- A provider-authenticated turn using your installed OMP configuration.
- The exact startup and optional-method behavior of your current ChatGPT desktop release.
The public protocol and supplied Codex snapshot are implemented, but the desktop app may make additional version-specific discovery calls. Unsupported requests deliberately return -32601 with the method name rather than hanging or silently weakening behavior.
The package includes:
scripts/codex-trace-wrapper.mjs
That can wrap an official codex-real installation and capture the app’s actual argv and raw protocol traffic. The first real ChatGPT SSH connection attempt—or its redacted trace—is the useful next input for closing any remaining desktop-specific compatibility gaps.