Skip to content

exec-server: support pending environment readiness#31988

Open
sayan-oai wants to merge 1 commit into
mainfrom
codex/pending-environment-readiness
Open

exec-server: support pending environment readiness#31988
sayan-oai wants to merge 1 commit into
mainfrom
codex/pending-environment-readiness

Conversation

@sayan-oai

@sayan-oai sayan-oai commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Why

CCA environments only have a stable exec-server URL once the filesystem and execution environment are genuinely ready. Requiring that URL during registration forces those providers either to delay registration or to expose an endpoint before the environment can actually be used.

This change lets an in-process provider register the environment ID immediately and publish the stable URL at the provider's canonical readiness transition. Codex then follows the existing WebSocket connection and initialization path, so downstream environment selection and wait_for_environment behavior continue to use the established readiness contract.

What changed

  • add EnvironmentManager methods to register a pending environment, publish its exec-server URL, or fail and remove it
  • represent ready and deferred URLs with one shared, one-shot ExecServerUrl source used by the existing WebSocket transport
  • reject duplicate pending registrations and fail existing waiters when a pending environment is replaced
  • preserve the existing direct-URL registration and reconnect behavior
  • exercise manager-driven starting to ready and starting to unavailable transitions through the core deferred-environment flow

@sayan-oai sayan-oai requested a review from a team as a code owner July 10, 2026 02:43
@sayan-oai

Copy link
Copy Markdown
Contributor Author

@codex review this

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: 358eb9db23

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant