Skip to main content

Module codex_wrap

Module codex_wrap 

Source
Expand description

omni-dev codex-wrap — the Codex TUI on a private app-server, observed.

Runs the Codex TUI against a private Codex app-server that this process starts and owns, and reports the exact thread status it polls from that server to the daemon’s sessions service (#1910, ADR-0088). The Codex analogue of omni-dev claude-wrap.

The Codex VS Code extension and Desktop each run their own private stdio app-server, so no outside process can read their threads’ status. A session omni-dev launches can be different: this wrapper starts codex app-server --listen unix://<runtime-dir>/codex-wrap-<pid>.sock, runs codex --remote unix://… <args> in the foreground on the caller’s terminal, and polls that server with crate::sessions::codex_app_server — never subscribing and never answering a server request, so it cannot see, answer or duplicate an approval. It attaches only to the server it started.

Fail-open is the hard rule, as for claude-wrap: if the app-server does not come up, this process is replaced by plain codex <args>; if the observer cannot connect, the TUI still runs, unobserved. An invocation the remote TUI does not serve (a non-interactive subcommand, no terminal, or an explicit --remote) is passed straight to codex the same way.

The server lives exactly as long as the wrapper: when the TUI exits, the wrapper ends the sessions it reported, stops the server and removes its socket. Nothing is logged or persisted.

Structs§

CodexWrapCommand
Runs the Codex TUI against a private app-server, reporting its exact state.