Skip to content

Feature Request: Add HTTPS-only Transport Option #27381

Description

@itqiankun

Summary

Please add a way to force Codex to use HTTPS transport directly without attempting WebSocket connections first.

Problem

In some network environments (corporate proxies, Clash/Mihomo, VPNs, restricted networks), WebSocket connections frequently fail or time out.

Current behavior:

  1. Codex attempts WebSocket transport.
  2. Connection times out.
  3. Codex retries multiple times.
  4. Codex falls back to HTTPS.
  5. Request finally succeeds.

Example log:

Falling back from WebSockets to HTTPS transport
Reconnecting... 4/5
Request timed out

Although HTTPS works correctly, users must wait through several failed WebSocket attempts before the request is processed.

Expected Behavior

Allow users to explicitly disable WebSocket transport.

Examples:

codex --transport=https

or

transport = "https"

or

supports_websockets = false

Benefits

  • Faster startup in restricted network environments.
  • Better compatibility with enterprise proxies.
  • Reduced connection delays.
  • More predictable behavior.

Environment

  • Codex CLI: v0.139.0
  • Platform: macOS
  • Network: Proxy / Clash environment
  • HTTPS works correctly after WebSocket fallback.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIIssues related to the Codex CLIconnectivityIssues involving networking or endpoint connectivity problems (disconnections)enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions