Skip to content

Windows MXC managed proxy: Schannel revocation failure (curl 60) in Codex CLI 0.162.1 #53276

Open

Description

@Lordprimate

What version of Codex CLI is running?

codex-cli 0.162.1

What subscription do you have?

ChatGPT Pro

Which model were you using?

N/A — standalone CLI sandbox command

What platform is your computer?

indows 11 Pro, version 26H2, OS build 26300.9550, x64

What terminal emulator and version are you using (if applicable)?

Windows Console Host / Windows PowerShell 5.1; sandbox subprocess: PowerShell 7.6.5 (.NET 10).

Codex doctor report

{
  "schemaVersion": 1,
  "overallStatus": "warning",
  "codexVersion": "0.162.1",
  "checks": {
    "installation": {
      "status": "ok",
      "details": {
        "managed by npm": "true"
      }
    },
    "runtime.provenance": {
      "status": "ok",
      "details": {
        "platform": "windows-x86_64",
        "version": "0.162.1"
      }
    },
    "config.load": {
      "status": "warning",
      "details": {
        "config.toml parse": "ok",
        "startup warnings": "1",
        "startup warning deprecated": "1"
      }
    },
    "desktop.app.version": {
      "status": "ok",
      "details": {
        "version": "26.1007.2314.0"
      }
    },
    "network.env": {
      "status": "ok",
      "details": {
        "managed proxy": "not configured",
        "proxy env vars": "none",
        "respect system proxy": "disabled"
      }
    },
    "network.provider_reachability": {
      "status": "ok",
      "summary": "active provider endpoints are reachable over HTTP"
    },
    "network.websocket_reachability": {
      "status": "ok",
      "details": {
        "handshake result": "HTTP 101 Switching Protocols"
      }
    },
    "sandbox.helpers": {
      "status": "warning",
      "details": {
        "sandbox backend": "elevated",
        "sandbox provisioning": "incomplete"
      }
    },
    "system.environment": {
      "status": "ok",
      "details": {
        "os": "Windows 10.0.26300 (Windows 11 Professional) [64-bit]"
      }
    },
    "updates.status": {
      "status": "ok",
      "details": {
        "latest version": "0.162.1",
        "latest version status": "current version is not older"
      }
    }
  }
}

What issue are you seeing?

Issue Summary

On Windows 11 Pro 26H2 (x64), Codex CLI 0.162.1 fails HTTPS certificate validation when using the native MXC sandbox with its managed network proxy enabled.

The problem persists after upgrading from Codex CLI 0.160.1 to 0.162.1.

Observed Behavior

The MXC sandbox starts successfully, and the managed network proxy activates with a temporary read-only permission profile, limited network access, and api.nuget.org as the allowed domain.

All four proxy indicators are present:

  • CODEX_NETWORK_PROXY_ACTIVE=True
  • HTTPS_PROXY=True
  • HTTP_PROXY=True
  • ALL_PROXY=True

However, HTTPS requests fail during TLS certificate validation.

PowerShell 7.6.5 / .NET 10:

System.Security.Authentication.AuthenticationException: The remote certificate is invalid because of errors in the certificate chain: PartialChain

Windows Schannel curl:

curl: (60) schannel: the revocation status is unknown
HTTP 000
curl exit code: 60

The curl test explicitly supplied the Codex CA bundle using --cacert. Certificate verification and revocation checks remained enabled.

Certificate Findings

The managed proxy supplies a readable certificate bundle containing 51 certificates through CODEX_CA_CERTIFICATE, SSL_CERT_FILE, and CURL_CA_BUNDLE.

One certificate, CN=network_proxy MITM CA, is absent from both Windows Trusted Root stores. This may be expected for an ephemeral proxy CA, but the connection fails to establish a valid trust chain.

The exact certificate responsible for the revocation failure has not yet been independently identified.

Comparison

The same PowerShell 7.6.5 executable successfully resolves api.nuget.org outside the Codex sandbox.

Without MXC's managed proxy, network requests failed during hostname resolution. With the proxy enabled, requests advance to TLS verification but fail with the errors described above.

Expected Behavior

MXC's managed network proxy should permit authorized HTTPS connections while preserving certificate-chain validation, hostname verification, and revocation checks.

The solution should not require disabling TLS verification, suppressing revocation errors, or permanently installing an ephemeral proxy CA into the system-wide Trusted Root store.

Additional Context

A separate Codex Desktop NuGet restore issue exists, but it has not been established that both issues share the same underlying cause.

No permanent certificate, firewall, antivirus, or sandbox security changes were made.

Related issue: #45202

What steps can reproduce the bug?

Prerequisites

  • Windows 11 Pro 26H2, x64
  • Codex CLI 0.162.1
  • PowerShell 7.6.5
  • Native Windows MXC sandbox support

Reproduction Steps

1. Open a normal, non-administrator Windows PowerShell session.

2. Verify the installed CLI version:

codex.cmd --version

Expected: codex-cli 0.162.1

3. Set $pwsh to the absolute path of an existing PowerShell 7.6.5 executable.

4. Prepare a PowerShell HTTPS request:

$test = 'try { $r = Invoke-WebRequest -Uri https://api.nuget.org/v3/index.json -Method Get -TimeoutSec 30 -ErrorAction Stop; "HTTP $([int]$r.StatusCode)" } catch { $_.Exception.ToString(); exit 1 }'

$encoded = [Convert]::ToBase64String(
    [Text.Encoding]::Unicode.GetBytes($test)
)

5. Execute it inside MXC using a temporary read-only profile and a managed proxy limited to api.nuget.org:

codex.cmd -c windows.sandbox=mxc --enable network_proxy -c 'permissions.w2995_probe.extends=":read-only"' -c 'permissions.w2995_probe.network.enabled=true' -c 'permissions.w2995_probe.network.mode="limited"' -c 'permissions.w2995_probe.network.allow_local_binding=true' -c "permissions.w2995_probe.network.domains={'api.nuget.org'='allow'}" sandbox --include-managed-config --permission-profile w2995_probe -- $pwsh -NoProfile -NonInteractive -EncodedCommand $encoded

6. Observe the .NET exception:

System.Security.Authentication.AuthenticationException:
The remote certificate is invalid because of errors
in the certificate chain: PartialChain

7. Repeat the MXC invocation with Windows System32 curl using the Codex-provided CA bundle:

$test = '& "$env:SystemRoot\System32\curl.exe" -q --silent --show-error --fail --connect-timeout 15 --max-time 30 --cacert $env:CODEX_CA_CERTIFICATE --proto "=https" --output NUL --write-out "HTTP %{http_code}`n" "https://api.nuget.org/v3/index.json"; exit $LASTEXITCODE'

$encoded = [Convert]::ToBase64String(
    [Text.Encoding]::Unicode.GetBytes($test)
)

Run the same command from Step 5 again with the updated $encoded value.

Actual Result

curl: (60) schannel: the revocation status is unknown
HTTP 000
Exit code: 60

The managed proxy activates successfully. Its certificate bundle is present and readable, but HTTPS certificate validation fails.

Expected Result

The authorized HTTPS request should return HTTP 200 with valid certificate-chain, hostname, and revocation verification.

Additional Notes

  • Reproduced on CLI 0.160.1 and 0.162.1.
  • Certificate validation and revocation checking remained enabled.
  • No certificate-store modifications or permanent configuration changes were made.
  • The exact certificate responsible for the failure remains unidentified.

What is the expected behavior?

When the MXC sandbox's managed network proxy is enabled and api.nuget.org is explicitly allowed, HTTPS requests should complete successfully with HTTP 200.

The proxy should provide Windows Schannel and .NET clients with a complete, properly trusted certificate chain and support successful certificate-revocation verification.

Certificate-chain validation, hostname verification, and revocation checks must remain enabled.

This should work without:

  • Disabling TLS or certificate-revocation checks.
  • Installing temporary proxy certificates into the system-wide Trusted Root store.
  • Disabling antivirus or firewall protection.
  • Broadening sandbox or network permissions beyond the explicitly authorized policy.

The expected result is secure HTTPS connectivity through the managed proxy while preserving the sandbox's security protections.

Additional information

Additional Diagnostic Findings

1. Sandbox and proxy configuration

  • MXC successfully launches with exit code 0.
  • The managed network proxy activates when explicitly enabled.
  • All four proxy environment indicators are present.
  • The temporary permission profile is read-only, with limited networking and api.nuget.org allowlisted.
  • No permanent Codex configuration changes were made.

2. Certificate investigation

The Codex-provided certificate bundle contains 51 certificates.

Of those, 50 were found in at least one Windows Trusted Root store. The remaining certificate was:

CN=network_proxy MITM CA

This is consistent with a possible proxy trust-chain integration issue, but the certificate actually responsible for the HTTPS failure has not been conclusively identified.

3. Version comparison

The certificate-validation failure was reproduced with:

  • Codex CLI 0.160.1
  • Codex CLI 0.162.1

Updating the standalone CLI did not resolve the error.

4. Independent Windows comparison

Outside the Codex sandbox, the same PowerShell 7.6.5 executable successfully resolved api.nuget.org.

This supports an execution-context-specific issue rather than a general DNS outage.

5. Separate Codex Desktop issue

Codex Desktop previously experienced NuGet restore/audit failures (NU1900) under restricted Windows execution.

Microsoft DNS tracing also recorded local DNS Client failures during those investigations.

These findings are included only as potentially relevant context. The Desktop restore problem and the standalone CLI MXC certificate-validation problem have not been proven to share the same root cause.

6. Diagnostic availability

Additional diagnostic evidence is available, including sanitized command outputs and Windows DNS tracing. Raw diagnostic archives are being retained privately because they may contain sensitive system information.

No certificate-validation bypass, revocation bypass, permanent certificate import, antivirus exclusion, or unrestricted sandbox mode was used.

Activity

  1. added
    bug
    on Oct 12, 2026
  2. added
    CLI
    windows-os
    sandbox
    connectivity
    on Oct 12, 2026
  3. Lordprimate commented on Oct 12, 2026

    @Lordprimate
    Author

    I have a closely matching Windows Codex Work failure.

    Environment:

    • Windows 11 Pro 26H2
    • Codex Desktop 26.1007.2314.0
    • Local file access: Workspace write
    • Local network access: On
    • Model: GPT-6 Sol (as shown in Desktop settings)

    After a successful development session and chat handoff, a new session could not complete an audit-enabled .NET restore.

    Observed:

    • NuGet fails with NU1900.
    • A managed HTTPS diagnostic fails with SocketException 11001 (HostNotFound).
    • CODEX_SANDBOX_NETWORK_DISABLED is true.
    • No managed proxy variables are present.
    • The thread reports no network-only permission request mechanism.
    • The only available escalation is require_escalated, described as unsandboxed execution.

    I did not authorize unsandboxed execution because the build must preserve workspace filesystem isolation.

    The same FLS solution compiled successfully in an earlier session, although that session's effective network policy was not recorded.

    Windows DNS works outside Codex, including with the same PowerShell 7.6.5 executable.

    Could maintainers investigate why this thread cannot obtain an approved network grant while retaining workspace-write isolation?

    Related but distinct standalone CLI MXC certificate issue: #53276.

  4. denelon commented on Nov 5, 2026

    @denelon

    A Microsoft MXC feature request may be relevant to the managed-proxy certificate behavior reported here:

    Both issues concern allowing native Windows TLS clients inside a BaseContainer to trust an explicitly authorized proxy CA without modifying the host’s machine-wide root store or disabling certificate verification. The Codex report observes .NET PartialChain and Schannel revocation failures despite a supplied CA bundle, while the MXC issue focuses on the missing container-scoped native trust-provisioning contract. This overlap suggests the MXC capability may be relevant, but it does not establish that the reported revocation failure and trust-provisioning limitation have the same root cause.

    Drafted with GitHub Copilot assistance.
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

    CLIbugconnectivitysandboxwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions