openai/codex · error · anyhow::Error

`codex agents` received conflicting remote server endpoints

Error message

`codex agents` received conflicting remote server endpoints

What it means

Error "`codex agents` received conflicting remote server endpoints" thrown in openai/codex.

Source

Thrown at codex-rs/cli/src/main.rs:1071

        config_overrides: mut root_config_overrides,
        feature_toggles,
        remote,
        mut interactive,
        subcommand,
    } = MultitoolCli::parse();
    // Fold --enable/--disable into config overrides so they flow to all subcommands.
    let toggle_overrides = feature_toggles.to_overrides()?;
    root_config_overrides.raw_overrides.extend(toggle_overrides);
    let agents_options = match &subcommand {
        Some(Subcommand::Agents(options)) => Some(options),
        _ => None,
    };
    if let Some(options) = agents_options
        && let Some(root_endpoint) = &remote.remote
        && let Some(agents_endpoint) = &options.remote.remote
        && root_endpoint != agents_endpoint
    {
        anyhow::bail!("`codex agents` received conflicting remote server endpoints");
    }
    let root_remote = agents_options
        .and_then(|options| options.remote.remote.clone())
        .or(remote.remote);
    let root_remote_auth_token_env = agents_options
        .and_then(|options| options.remote.remote_auth_token_env.clone())
        .or(remote.remote_auth_token_env);
    if let Some(options) = agents_options {
        interactive.cwd = options.cwd.clone().or(interactive.cwd.take());
        interactive.no_alt_screen |= options.no_alt_screen;
    }
    let root_strict_config = interactive.strict_config;
    interactive
        .shared
        .take_auto_review_config_overrides(&mut root_config_overrides);
    reject_root_strict_config_for_subcommand(root_strict_config, &subcommand)?;
    if let Some(subcommand) = subcommand.as_ref() {
        profile_v2_for_subcommand(&interactive, subcommand)?;

View on GitHub (pinned to 339751715c)

When it happens

Trigger: Thrown at codex-rs/cli/src/main.rs:1071 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of openai/codex@339751715c (2026-08-25). Data as JSON: /api/errors/af86c21a3e764bd4. Report an issue: GitHub.