Skip to content

Unify Environment preparation across managed and user machines - #246

Merged
SaladDay merged 3 commits into
mainfrom
codex/unified-environment-preparation-20260930
Sep 30, 2026
Merged

SaladDay merged 3 commits into
mainfrom
codex/unified-environment-preparation-20260930

Conversation

@SaladDay

@SaladDay SaladDay commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Hosted and user-managed machines now use the same frozen Environment preparation input and Runtime operations. A self-hosted Session can use x_agents_core.environment for a Template, uploaded Skills/Plugins, files, env, packages or setup; it no longer needs a managed allocation to prepare.

Preparation ownership moves from RuntimeAllocation to Environment. The common worker checks authorization and Harness availability, settles failed or unknown work without replay, and keeps connection, preparation and execution readiness separate. Runtime snapshots explicit local tool variables, preserves the operator source, and reuses the snapshot after reconnect. Disabled/restricted network requests reject before allocation.

Validation

  • Pinned official SDK + real MiniMax-M2.7 execution: Linux self-hosted Codex, Claude SDK and MiniMax Code; Docker managed Codex; native macOS Codex. Each completed uploaded Skill + Plugin stdio MCP + initial file/setup and a second Turn after daemon/container restart.
  • Template edits affected new Sessions; existing Sessions retained installed snapshot hashes.
  • Real explicit tool-env-file cases covered local defaults, Session overrides, unchanged source, edited source + reconnect, empty preparation, and initial-file-only preparation.
  • Focused API/store/Runtime/Harness/type tests passed. Full make check completed all stages before two Web tests failed with browser ERR_NETWORK_CHANGED; both passed on targeted replay. The remaining catalog/docs/example/MiniMax targets then passed. Integration and credential-inheritance regression tests passed after merging main.
  • Independent final review found no issues at 4b97c11f against main 9b735aa1. All required CI passed at 4b97c11f: full core-check (make check), official-client, and native Linux/macOS/Windows checks.
  • OpenAPI, sqlc and docs regenerated. See contracts/agents-api/environment-preparation-qualification.md for evidence scope and failed-attempt exclusions.

Scope and limits

No compatibility layer, historical backfill, automatic environment destruction or migration of user data. No new image/structured-output/tool-discovery or public HTTP MCP qualification; those are separate changes. No Windows manual machine test, no Claude installation on the Mac, and no E2B/microsandbox requalification in this PR. Live runs did not download npm/Python dependencies; their existing mechanism tests remain in the suite.

The database schema moves initialization state to Environment (migration 090). Existing disposable test installations must be explicitly rebuilt if needed; this change does not automatically rebuild or delete them.

Creation intent retains caller input once: valid multi-file extension requests stay within the existing request-size budget. The pinned hosted-failure response and generated API description remain unchanged.

Preparation-only extensions can inherit a saved Agent model provider or a managed deployment default without resubmitting credentials. HTTP Session-creation regressions cover both environment owners and still reject deployment credentials for self-hosted Sessions.

@SaladDay
SaladDay marked this pull request as ready for review September 29, 2026 18:24
@SaladDay SaladDay closed this Sep 29, 2026
@SaladDay SaladDay reopened this Sep 29, 2026
@SaladDay
SaladDay force-pushed the codex/unified-environment-preparation-20260930 branch from 2649489 to 70e6f70 Compare September 29, 2026 18:28
@SaladDay
SaladDay merged commit 13d5aaf into main Sep 30, 2026
6 checks passed
@SaladDay
SaladDay deleted the codex/unified-environment-preparation-20260930 branch October 7, 2026 06:38
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