TUI crashes when skills/list fails behind corporate proxy
Bug description
When running Codex CLI behind a corporate proxy/firewall that intercepts HTTPS requests to chatgpt.com, the TUI crashes with:
Error: skills/list failed in TUI
Caused by:
0: request to https://chatgpt.com/backend-api/plugins/featured?platform=codex failed
1: error decoding response body
2: expected value at line 1 column 1
The proxy redirects the request via 302 to an HTML warning page, which is then returned with a 200 status code. The reqwest client follows the redirect, receives HTML instead of JSON, and fails to parse it.
Root cause
In codex-rs/tui/src/app.rs, the AppCommandView::ListSkills handler propagates errors with ?:
AppCommandView::ListSkills { cwds, force_reload } => {
let response = app_server
.skills_list(...)
.await?; // <-- crashes TUI on error
self.handle_skills_list_response(response);
Ok(true)
}
This error bubbles up through the TUI event loop and causes a fatal exit. However, the startup code path for the same operation already handles this gracefully with match + warn.
Expected behavior
Plugin discovery failures (skills/list, featured plugins, etc.) should degrade gracefully — log a warning and continue operating. The main TUI functionality should not depend on plugin discovery succeeding.
Steps to reproduce
- Run Codex CLI behind a corporate proxy/firewall that intercepts requests to
chatgpt.com - The proxy returns HTML instead of JSON for
chatgpt.com/backend-api/plugins/featured - TUI crashes on startup or when skills are refreshed
Environment
- OS: Windows 11
- Network: Behind corporate proxy/firewall
- Auth: ChatGPT auth mode
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗