Codex✓ Confirmed in official docsAdded Nov 20
How to run codex exec against an already running app server with --remote
Starting with Codex CLI 0.171.0 (November 20), codex exec accepts --remote. It runs a noninteractive turn on an app server that's already running, using that server's configuration and credentials instead of starting a fresh process.
- Update.
npm install -g @openai/codex@0.171.0
- Start an app server. Use
unix://for the default local Unix socket, orws://IP:PORTto accept network connections. The docs describe the app server as primarily for development and debugging, and say it may change without notice.
codex app-server --listen unix://
- From another terminal or a script, connect to the same address.
--remotecan go before or afterexec; add--jsonfor JSON output.
codex exec --remote unix:// "run the tests and summarize the failures"
codex exec --remote unix:// --json "review the changes"
You can start a new thread or resume one by its session UUID. If the server requires a token, pass the name of the environment variable holding it with --remote-auth-token-env.
Codex rejects unsupported agent configuration overrides, active threads, and two conflicting endpoints, and reports an error if the server disconnects before the turn completes.
Sources
Get notified when a new tip lands
Tip alerts only go out in the app. Install it and turn notifications on.