| name | fix-codex-reconnecting |
| description | Switch Codex between HTTP-only and WebSocket/default network modes by editing the Codex config. Use when Codex repeatedly retries WebSocket connections, when the user wants to force HTTP, when the user wants to restore the default provider, or when checking the current mode. |
Fix Codex Reconnecting
Use this skill to change Codex network mode without touching unrelated settings.
Workflow
- Read the current
~/.codex/config.toml.
- Create a timestamped backup before writing.
- Run
scripts/switch_codex_network_mode.ps1 for the actual edit.
- Preserve unrelated config, plugin, and MCP settings.
- Treat third-party config managers such as
ccswitch as owners of the same file; they can overwrite these changes later.
- Validate with
codex debug models.
- Tell the user to restart the Codex desktop app.
Modes
http: set model_provider = "openai_http" and add [model_providers.openai_http] with supports_websockets = false.
websocket: remove the openai_http override and return to the built-in provider.
status: report the current mode without modifying files.
User Copy
Use README.md when the user wants a copy-paste prompt instead of installing the skill.
Files
scripts/switch_codex_network_mode.ps1: applies the mode change with backup handling.
README.md: user-facing prompts, warnings, and recovery notes.