[feature] Support voice mode
Problem Statement
Codex CLI's native voice mode does not work when launched through codex-multi-auth with runtime rotation enabled.
Starting a voice session fails with:
■ unexpected status 404 Not Found:
Runtime rotation proxy only accepts Responses API, images,
transcription, model discovery, and Codex thread goal requests.
url: http://127.0.0.1:42383/live
The runtime proxy supports ordinary Codex requests and audio transcription, but not the live voice endpoint. Consequently, users must disable runtime rotation to use native voice conversations, losing multi-account routing for that session.
Proposed Solution
Extend the runtime rotation proxy to support Codex's native live voice protocol.
The implementation should:
- Recognize and forward
/liverequests and any associated realtime session endpoints required by supported Codex versions. - Support the necessary persistent streaming transport, including WebSocket upgrades where applicable, rather than treating live sessions as ordinary HTTP requests.
- Authenticate upstream connections using the selected managed ChatGPT OAuth account.
- Maintain account affinity throughout each live session, avoiding account rotation after an active connection has been established.
- Preserve bidirectional audio, events, session lifecycle, and error propagation.
- Reuse existing account selection, authorization, and quota policies where applicable.
The expected result is that users can start and maintain native Codex voice conversations without disabling codex-multi-auth runtime rotation.
Alternatives Considered
None provides full native voice functionality with managed-account support.
Scope
In scope:
- Native Codex CLI live voice compatibility.
- Required realtime HTTP/WebSocket forwarding.
- Managed OAuth authentication and per-session account affinity.
- Connection lifecycle management, error handling, and regression tests.
Out of scope:
- Implementing a separate voice interface or speech engine.
- Supporting unrelated third-party realtime protocols.
- Bypassing subscription eligibility, authentication requirements, or upstream rate limits.
- Automatically migrating active voice sessions between accounts.
Validation Plan
- Run the test suite and static checks:
npm run typecheck
npm test
npm run lint
- Confirm the existing proxy configuration:
codex-multi-auth rotation status
- Establish a baseline with rotation disabled for one process:
CODEX_MULTI_AUTH_RUNTIME_ROTATION_PROXY=0 codex-multi-auth-codex
Start /voice and verify that a voice session can be established with an eligible account.
- Repeat with runtime rotation enabled:
codex-multi-auth rotation enable
codex-multi-auth-codex
Start /voice and verify that:
- The
/liverequest is accepted rather than rejected with HTTP 404. - A realtime connection is established successfully.
- Bidirectional audio and session events function correctly.
- The selected managed account remains consistent throughout the session.
- Ending or interrupting a session closes its connections and releases resources.
-
Add automated tests using mocked upstream realtime endpoints to verify routing, authentication, WebSocket upgrades (if required), connection teardown, upstream errors, and prevention of mid-session account switching.
-
Confirm existing Responses API, image, and transcription routes continue functioning unchanged.
Compliance Confirmation
- [x] This proposal is for legitimate personal development workflows.
- [x] This proposal does not request bypassing OpenAI controls or policies.
- [x] This proposal does not introduce multi-tenant resale behavior.