Agent Sandboxesagentsandboxes.org
Head-to-head

Azure Container Apps dynamic sessions vs OpenAI Code Interpreter & Hosted Shell

Answer in brief

Choose Azure Container Apps dynamic sessions for Azure-native apps running LLM-generated Python or Node code with egress off by default; choose OpenAI Code Interpreter & Hosted Shell for apps already on the OpenAI Responses API that want model-driven code execution with no extra vendor. Azure Container Apps dynamic sessions uses Hyper-V VM isolation; OpenAI Code Interpreter & Hosted Shell uses VM (unspecified) isolation.

By the Agent Sandboxes editors · Updated

Key differences between Azure Container Apps dynamic sessions and OpenAI Code Interpreter & Hosted Shell

  • Isolation: Azure Container Apps dynamic sessions uses Hyper-V VM; OpenAI Code Interpreter & Hosted Shell uses VM (unspecified).
  • Session length: 220 s / exec (Azure Container Apps dynamic sessions) versus 20 min idle (OpenAI Code Interpreter & Hosted Shell).
  • SDKs and interfaces: Only Azure Container Apps dynamic sessions lists REST API, Azure CLI, LangChain, LlamaIndex and Semantic Kernel. Only OpenAI Code Interpreter & Hosted Shell lists OpenAI Responses API, Containers API and OpenAI SDKs.

What they have in common

  • Both companies are based in the United States.
  • Both are cloud or model provider services.
  • Both use full virtual machines.
  • Neither is open source.

Azure Container Apps dynamic sessions vs OpenAI Code Interpreter & Hosted Shell at a glance

AttributeAzure Container Apps dynamic sessionsOpenAI Code Interpreter & Hosted Shell
What it isAzure service that hands out Hyper-V-isolated sessions from prewarmed pools, either as a built-in code interpreter or running your own container image.Hosted containers in the OpenAI Responses API that the model uses to run Python (Code Interpreter) or shell commands (Hosted Shell).
TypeCloud or model provider serviceCloud or model provider service
IsolationHyper-V isolation; each session is isolated by a Hyper-V boundaryDocumented as a fully sandboxed virtual machine; underlying technology not named
Open sourceNoNo
Self-host / BYOCNo / NoNo / No
SDKsREST API, Azure CLI, LangChain, LlamaIndex, Semantic KernelOpenAI Responses API, Containers API, OpenAI SDKs
Cold start (vendor claim)Prewarmed pools allocate sessions in milliseconds (no specific figure)Not documented
Max sessionCode interpreter: 220 s per execution; sessions deleted after a 5–60 min idle cooldownContainers expire after 20 minutes of inactivity and cannot be reactivated
PersistenceSession reuse by identifier; files in /mnt/data for the session’s life. Snapshots are not documented; sessions are ephemeralFiles and state persist while the container is active; reusable by container ID; snapshots are not documented
Snapshots / pauseNot documented / Not documentedNot documented / No
GPUNot documentedNot documented
NetworkingPer-pool egress setting; egress disabled by defaultNo outbound network by default; Hosted Shell can allow specific domains via an org allowlist and per-request network policy, with credential placeholders
PricingCode interpreter: $0.03 per session-hour (East US, Azure Retail Prices API), billed in one-hour increments. Custom container sessions billed on the Dedicated planPer container per 20-minute session: $0.03 (1 GB), $0.12 (4 GB), $0.48 (16 GB), $1.92 (64 GB); model tokens billed separately
Free tierNone stated for dynamic sessionsNot documented
ComplianceNot documentedNot documented
Regions38 Azure regions listed in the docsNot documented
Company headquartersRedmond, Washington, United StatesSan Francisco, California, United States
Good fit forAzure-native apps running LLM-generated Python or Node code with egress off by defaultApps already on the OpenAI Responses API that want model-driven code execution with no extra vendor

Verified November 14, 2026 from each provider’s documentation. Cold-start figures are vendor claims, not our measurements.

Which should you choose?

Reasons to choose Azure Container Apps dynamic sessions

  • You build on Azure and want Hyper-V isolation without managing infrastructure
  • You want egress disabled by default
  • You use LangChain, LlamaIndex or Semantic Kernel

Reasons to choose OpenAI Code Interpreter & Hosted Shell

  • You already use the OpenAI Responses API
  • You want zero additional infrastructure
  • You need egress off by default with domain allowlisting

Trade-offs to check first

  • Azure Container Apps dynamic sessions: 220-second execution limit on the code interpreter
  • Azure Container Apps dynamic sessions: Code interpreter sessions are billed in one-hour increments
  • OpenAI Code Interpreter & Hosted Shell: Available only through OpenAI’s API and models
  • OpenAI Code Interpreter & Hosted Shell: Containers expire after 20 idle minutes

Both are worth piloting with your own image and region. See the full Azure Container Apps dynamic sessions profile and OpenAI Code Interpreter & Hosted Shell profile, or the complete comparison.

More comparisons

Frequently asked questions

Is Azure Container Apps dynamic sessions or OpenAI Code Interpreter & Hosted Shell better for AI agents?
Neither is better for every workload. Azure Container Apps dynamic sessions suits Azure-native apps running LLM-generated Python or Node code with egress off by default. OpenAI Code Interpreter & Hosted Shell suits apps already on the OpenAI Responses API that want model-driven code execution with no extra vendor.
What is the difference between Azure Container Apps dynamic sessions and OpenAI Code Interpreter & Hosted Shell?
Azure Container Apps dynamic sessions uses Hyper-V VM; OpenAI Code Interpreter & Hosted Shell uses VM (unspecified). Session length: 220 s / exec (Azure Container Apps dynamic sessions) versus 20 min idle (OpenAI Code Interpreter & Hosted Shell). Only Azure Container Apps dynamic sessions lists REST API, Azure CLI, LangChain, LlamaIndex and Semantic Kernel. Only OpenAI Code Interpreter & Hosted Shell lists OpenAI Responses API, Containers API and OpenAI SDKs.
Which is open source, Azure Container Apps dynamic sessions or OpenAI Code Interpreter & Hosted Shell?
Neither is open source.
How do Azure Container Apps dynamic sessions and OpenAI Code Interpreter & Hosted Shell isolate code?
Azure Container Apps dynamic sessions: Hyper-V isolation; each session is isolated by a Hyper-V boundary. OpenAI Code Interpreter & Hosted Shell: Documented as a fully sandboxed virtual machine; underlying technology not named.
How does Azure Container Apps dynamic sessions pricing compare with OpenAI Code Interpreter & Hosted Shell?
Azure Container Apps dynamic sessions: Code interpreter: $0.03 per session-hour (East US, Azure Retail Prices API), billed in one-hour increments. Custom container sessions billed on the Dedicated plan. OpenAI Code Interpreter & Hosted Shell: Per container per 20-minute session: $0.03 (1 GB), $0.12 (4 GB), $0.48 (16 GB), $1.92 (64 GB); model tokens billed separately. Rates change, so check the Azure Container Apps dynamic sessions and OpenAI Code Interpreter & Hosted Shell pricing pages before deciding.
Can you self-host Azure Container Apps dynamic sessions or OpenAI Code Interpreter & Hosted Shell?
Neither documents a self-hosted option.
How long can sessions run on Azure Container Apps dynamic sessions and OpenAI Code Interpreter & Hosted Shell?
Azure Container Apps dynamic sessions: Code interpreter: 220 s per execution; sessions deleted after a 5–60 min idle cooldown. OpenAI Code Interpreter & Hosted Shell: Containers expire after 20 minutes of inactivity and cannot be reactivated.
Do Azure Container Apps dynamic sessions and OpenAI Code Interpreter & Hosted Shell support snapshots or pause and resume?
Azure Container Apps dynamic sessions: snapshots not documented, pause and resume not documented. OpenAI Code Interpreter & Hosted Shell: snapshots not documented, pause and resume none documented.

Sources

  1. learn.microsoft.com/en-us/azure/container-apps/sessions
  2. learn.microsoft.com/en-us/azure/container-apps/sessions-code-interpreter
  3. learn.microsoft.com/en-us/azure/container-apps/session-pool
  4. azure.microsoft.com/en-us/pricing/details/container-apps/
  5. developers.openai.com/api/docs/guides/tools-code-interpreter
  6. developers.openai.com/api/docs/guides/tools-shell
  7. developers.openai.com/api/docs/pricing

Check before you rely on it. Products change quickly, and this page reflects public documentation as of November 14, 2026. Confirm anything that matters in the provider’s own documentation.

Cite this page

Agent Sandboxes. (2026). Azure Container Apps dynamic sessions vs OpenAI Code Interpreter & Hosted Shell. agentsandboxes.org. Last reviewed November 14, 2026. https://agentsandboxes.org/compare/azure-dynamic-sessions-vs-openai-code-interpreter/