Skip to content

TUI crashes when skills/list fails behind corporate proxy #17951

@jinyule

Description

@jinyule

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

  1. Run Codex CLI behind a corporate proxy/firewall that intercepts requests to chatgpt.com
  2. The proxy returns HTML instead of JSON for chatgpt.com/backend-api/plugins/featured
  3. TUI crashes on startup or when skills are refreshed

Environment

  • OS: Windows 11
  • Network: Behind corporate proxy/firewall
  • Auth: ChatGPT auth mode

Metadata

Metadata

Assignees

No one assigned

    Labels

    TUIIssues related to the terminal user interface: text input, menus and dialogs, and terminal displaybugSomething isn't workingconnectivityIssues involving networking or endpoint connectivity problems (disconnections)skillsIssues related to skills

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions