GPTMap

Hosted agent environments surface in the OpenAI SDKs: prewarmed creation, idle suspension, expiration

Four releases in three days, October 9-11, 2026: openai-python 3.27-3.29 and openai-node 7.32 surface one agent environment API — prewarmed beta creation, idle suspension, expiration. Quoted from release notes and SDK source.

TL;DR
October 9-11, 2026: openai-python v3.27.0 adds prewarmed hosted environments under client.beta.agents.environments, beta-gated creation ahead of a session; v3.28.0 and openai-node v7.32.0 add suspension (idle checkpointing, resumable from a snapshot) and expiration; v3.29.0 adds a billing_not_active error code and the shida Live voice. Availability and pricing are not stated at the SDK layer.
An agent environment is an OpenAI-hosted environment resource that appeared in stable openai-python and openai-node releases on 2026-10-09, under the beta/agents namespace: you create an openai_hosted environment (configurable network, packages, files, skills) before attaching it to a session; when idle it is checkpointed and stopped (suspended), and after a suspension window the environment and its checkpoint expire.

OpenAI's two official SDKs shipped four releases in three days, and they tell a single story: a hosted agent environment resource you can create, suspend, and expire. This article quotes the GitHub release notes and SDK tag source fetched on October 12, 2026 verbatim, and asserts nothing beyond that layer.

1. Timeline: four releases in three days

ReleasePublishedHeadline Feature line
openai-python v3.27.02026-10-09api: add prewarmed hosted environments (#4043)
openai-python v3.28.02026-10-09api: add agent environment suspension and expiration (#4046)
openai-node v7.32.02026-10-09api: add agent environment suspension and expiration (#2904)
openai-python v3.29.02026-10-11billing_not_active session error code, shida Live voice, vault updates and metadata filters, beta pagination alignment

Version numbers and dates come from the GitHub Releases API fetched the day this article was written. When the previous GPTMap article on the SDKs was fact-checked, python's latest was v3.26.1 and node's was v7.31.0 — this environment API line is what landed in the three days after.

2. Prewarmed creation: environments.create

The new resource lives under client.beta.agents.environments. The create docstring, verbatim:

Creates an OpenAI-hosted environment before creating a session. Requires access to the prewarming beta.

Two facts follow. First, environments are created before a session. Second, creation is gated behind the prewarming beta. The vault_ids parameter reads "The IDs of up to 10 vaults made available to an OpenAI-hosted environment", and the resource also exposes files and templates sub-resources.

The shape of the environment parameter, from environment_create_params.py at the v3.29.0 tag:

environment = {
    "type": "openai_hosted",           # required, the only literal today
    "desktop": {"enabled": True},       # optional
    "packages": {
        "npm": ["typescript@5"],
        "python": ["httpx"],
        "system": [],                   # three independent groups
    },
    "network": {
        "access": "restricted",         # enabled / disabled / restricted
        "allowed_domains": ["api.example.com"],
        "blocked_domains": [],
    },
    "env": {"FOO": "bar"},
    "setup_commands": [],               # list of SetupCommandParam
    "files": [],                        # HostedEnvironmentFileParam list
    "skills": [],                       # HostedSkillParam list
    "plugins": [],                      # HostedPluginParam list
    "capability_directories": [],
    "environment_template_id": "tmpl_...",
}

env = client.beta.agents.environments.create(
    environment=environment,
    vault_ids=["vault_..."],            # up to 10
)

This is a type-layer minimal example: every field and enum is transcribed from the source file, but no live call was made (beta-gated — your API response is the source of truth). One network caveat worth quoting: a non-empty allowed_domains list requires access: "restricted" and cannot be combined with certain settings (source comment: "A nonempty list requires access: restricted and cannot be combined with…" — the full constraint lives in the source).

3. Idle lifecycle: suspension and expiration

v3.28.0 (python) and v7.32.0 (node) added suspension and expiration the same day. The two new session event types, verbatim:

agent.session.environment.suspended
"Emitted after an idle hosted session environment is checkpointed and stopped."

agent.session.environment.expired
"Emitted after a suspended hosted session environment and its checkpoint expire."

In sequence: an idle environment is checkpointed and stopped (suspended); after a suspension window, the environment and its checkpoint expire. The webhook-side event reads "Sent when an agent environment is suspended and can resume from a snapshot" — suspended environments can resume from a snapshot. Event objects carry event_id, session_id, an optional turn_id, and the environment's current state.

4. What else arrived in v3.29.0

The October 11 release adds four more Feature lines:

  • a billing_not_active session error code — a new member of the session error family, named for a billing-not-active scenario;
  • shida joins the named Live voices — one more named voice in the Live speech family;
  • vault updates and metadata filters — vault-side updates plus metadata filtering;
  • aligned beta pagination limits and non-null parameters — pagination semantics pulled level across beta resources.

openai-node v7.32.0 carries one runners fix alongside the environment API: totalUsage preserves detailed token usage (#2900) — a worthwhile upgrade for projects that meter usage through runners.

5. Common errors and troubleshooting

  • Permission-or-not-found errors calling environments.create: confirm the SDK version first (openai-python ≥ 3.27.0, openai-node ≥ 7.32.0), then beta access — the docstring says "Requires access to the prewarming beta". This article cannot tell whether your account is in the beta; your API response can.
  • Receiving agent.session.environment.suspended is not a failure: per the event docs, it is the expected lifecycle action for an idle environment, and the webhook docs say it can resume from a snapshot.
  • billing_not_active: the new session error code added in v3.29.0; the name points at account billing state rather than code. No further trigger conditions appear in the day's loadable sources, so this article stops here.
  • How the environment attaches to a session: session events carry environment state, but the complete parameter surface for "how a session references an environment ID" is not fully present in the day's fetched type files — no guessing here; it goes on the next batch's checklist.

6. Next steps

Key points

  • Four releases in three days (dates from the GitHub Releases API, fetched 2026-10-12): openai-python v3.27.0 (Oct 9), v3.28.0 (Oct 9), v3.29.0 (Oct 11), and openai-node v7.32.0 (Oct 9) — the first two carry a single Feature line each: "add prewarmed hosted environments" and "add agent environment suspension and expiration"
  • The creation docstring, verbatim: client.beta.agents.environments.create — "Creates an OpenAI-hosted environment before creating a session. Requires access to the prewarming beta." The vault_ids parameter reads "The IDs of up to 10 vaults made available to an OpenAI-hosted environment"; the resource also exposes files and templates sub-resources
  • The environment parameter (environment_create_params.py at the v3.29.0 tag): type is a required Literal "openai_hosted"; optional surfaces include desktop.enabled, env, files, setup_commands, skills, plugins, capability_directories, environment_template_id, packages (npm/python/system), and network (access enum enabled/disabled/restricted with allowed_domains/blocked_domains under restricted)
  • Suspension and expiration (v3.28.0 onward, python and node the same day): the session event agent.session.environment.suspended reads "Emitted after an idle hosted session environment is checkpointed and stopped", and agent.session.environment.expired reads "Emitted after a suspended hosted session environment and its checkpoint expire"; the webhook-side event reads "Sent when an agent environment is suspended and can resume from a snapshot"
  • v3.29.0 (Oct 11) adds four more: a billing_not_active session error code, shida joining the named Live voices, vault updates and metadata filters, and aligned beta pagination limits and non-null parameters; openai-node v7.32.0 also fixes runners to preserve detailed token usage in totalUsage (#2900)
  • Boundaries: calling it depends on the prewarming beta (the SDK docstring says "Requires access to the prewarming beta"); pricing, regional availability, and the full session-attachment lifecycle are absent from both the type layer and the release notes — verify against your own API responses

Frequently asked questions

The types and resources are in stable SDK releases (openai-python ≥ v3.27.0, openai-node ≥ v7.32.0), but the create docstring states "Requires access to the prewarming beta" — creation is beta-gated. Whether your account has access, and how to request it, is not stated at the SDK layer; your own API response is the source of truth.

Official references

Related articles

Subscribe to GPTMap Weekly

One email every Monday: curated OpenAI updates, deep dives, and best practices. No ads, unsubscribe anytime.

Submitting opens Buttondown in a new tab to confirm your subscription.

GPTMap EditorialPublished 2026-10-12 5 min read
Test environment (EEAT)
Last tested: 2026-10-12
Model used: SDK: openai-python ≥ 3.27.0 / openai-node ≥ 7.32.0 (agent environments is a beta surface)