Skip to content

Codex Cloud: managed Tailscale enrollment fails before executor access without actionable diagnostics #50827

Open

Description

@poroburu

What issue are you seeing?

Codex Cloud's managed Tailscale VPN enrollment failed before an executor became available, so repository Install/Start commands could not run. The exposed failure fields were:

environment_startup_failed
vpn_enrollment_failed
stage: vpn_enrollment
cause: command_failed

The available environment metadata and setup-session tools did not expose the enrollment command's exit code or sanitized stderr, the managed Tailscale client version, or enough binding provenance to verify which saved VPN credential revision was delivered. This leaves an early provisioning failure without actionable diagnostics.

A later observation of the same failed runtime showed matching desired/observed revisions, pending state, and cleared failure fields, but no callable executor. A subsequent bounded readiness wait returned:

failed to query executor configuration capabilities for environment <runtime ID redacted>

The latter is a separate observed connection/capability failure; it is not evidence of a new VPN enrollment error or successful recovery.

What steps can reproduce the bug?

Observed sequence in a personal Codex Cloud environment using ChatGPT authentication:

  1. Configure the environment's managed VPN connection under Advanced > VPN with Tailscale, save the configuration, and publish/start the environment.
  2. Request startup through the environment setup chat's supported readiness wait.
  3. Observe the enrollment failure above before any executor or repository command is available.
  4. Read the supported runtime status and perform a bounded follow-up readiness check. The failure fields can clear while actual executor access remains unavailable.

The owner confirmed in the Tailscale UI that the configured key was active, reusable, and ephemeral. Those flags are owner-confirmed rather than independently verified through a Tailscale API export. A replacement key was also reported to fail during a subsequent publication attempt. We do not have a credential-free minimal reproduction or evidence that every managed VPN environment is affected.

What is the expected behavior?

An environment should either enroll and expose a working executor, or retain an actionable, sanitized provisioning failure. In particular, users/support need the enrollment stage, exit status and redacted stderr, client version, and applied configuration/VPN-binding correlation. Clearing current failure fields should not erase the useful explanation for a runtime that never became executable.

Additional information

  • Observed on 2026-10-04 UTC. The managed cloud backend/image version was not exposed. Local diagnostic CLIs were 0.159.0 and 0.160.0; these are not asserted to be the managed backend version. The desktop was running on Windows with WSL.
  • At 2026-10-04 04:16:56 UTC, the same owner-supplied VPN key successfully enrolled in an isolated native Linux Tailscale 1.102.4 userspace probe on WSL. Enrollment exited 0; BackendState was Running, the node was Online, and Health was empty. The probe then logged out and removed its own process and temporary state. This verifies key usability at that time, but does not verify managed key delivery or equivalence of client/transport/command settings.
  • The original cloud environment was subsequently replaced. A fresh task from the replacement published environment, with VPN unattached, passed startup and development QA (32 stages; 513 .NET tests). This is a different environment/configuration, not a controlled detach/restore test of the original, and does not prove the failure's root cause. VPN-enabled fresh acceptance remains unverified.
  • Repository setup logs cannot capture this incident because execution never reached Install. Inspection of the available setup tools and local app-server schemas found no managed VPN enrollment-log export. The documented experimental environment inspection returns shell/cwd for an existing executor, not managed provisioning logs.
  • We also inspected codex-universal's Dockerfile, entrypoint, and setup script at commit 47f4f0eb5337083e2f610db0d15558932cb4901d. Those sources configure the base image and language runtimes; they do not expose this managed enrollment operation. Its contributing guide routes bug reports to this tracker.

The root cause remains unknown. Please investigate the managed enrollment failure and expose the diagnostics needed to distinguish credential delivery, enrollment execution, and transport failures. If private runtime/configuration IDs are needed for correlation, please indicate an appropriate private support channel; credentials, private repository/tailnet identifiers, and runtime IDs are omitted from this public report.

Relevant official documentation:

Activity

  1. added
    bug
    codex-web
    connectivity
    on Oct 4, 2026
  2. zero19840209 commented on Oct 12, 2026

    @zero19840209

    We are seeing the same vpn_enrollment / command_failed failure, and we have Tailscale-side evidence that may help narrow it down: at the minute the cloud reported the enrollment failure, the Tailscale configuration log shows the node enrolled successfully.

    Setup

    • Codex Cloud environment with managed Tailscale VPN (personal account, ChatGPT auth).
    • Auth keys: Reusable + Ephemeral, pre-tagged with a single ACL tag that is defined in the tailnet policy.

    Observations (UTC, 2026-10-11)

    1. A fresh task started from the currently published environment failed at startup with stage: vpn_enrollment, cause: command_failed, around 18:55–18:56. No command ever ran.
    2. The Tailscale admin configuration log shows a new codex-environment-N node at 18:55 in that same window. Its entries are Create node, Log in node, Update ACL tags, and Disable key expiry, all by the auth key owner, with no errors. The node appeared in tailscale status with the expected tag. Tailscale later removed it as an ephemeral node.
    3. A different, already running task had worked through 05:25 that day, with requests reaching our tailnet service. At 18:40:57 the same task's HTTP request through the VPN got HTTP 503 from server: envoy with the body VPN is not configured. Tailscale also shows successful node enrollments at 18:40 and 18:42.
    4. Our side was healthy throughout: the tailnet service stayed up with no restarts in either window, and inbound delivery to the cloud task succeeded.

    What this suggests (not proven)
    Key validity, tag/ACL, and the Tailscale login itself all seem fine: the node does join the tailnet with the right tag. The failure appears to happen after the Tailscale login, inside the managed enrollment step or the egress proxy wiring, which we cannot observe. As this issue notes, there are no enrollment exit codes or stderr to confirm this.

    Runtime IDs can be provided through a private support channel. Credentials, tailnet name, and runtime IDs are omitted here.

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

    bugcodex-webconnectivity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions