Azure Container Apps dynamic sessions vs OpenAI Code Interpreter & Hosted Shell
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.
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
| Attribute | Azure Container Apps dynamic sessions | OpenAI Code Interpreter & Hosted Shell |
|---|---|---|
| What it is | Azure 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). |
| Type | Cloud or model provider service | Cloud or model provider service |
| Isolation | Hyper-V isolation; each session is isolated by a Hyper-V boundary | Documented as a fully sandboxed virtual machine; underlying technology not named |
| Open source | No | No |
| Self-host / BYOC | No / No | No / No |
| SDKs | REST API, Azure CLI, LangChain, LlamaIndex, Semantic Kernel | OpenAI Responses API, Containers API, OpenAI SDKs |
| Cold start (vendor claim) | Prewarmed pools allocate sessions in milliseconds (no specific figure) | Not documented |
| Max session | Code interpreter: 220 s per execution; sessions deleted after a 5–60 min idle cooldown | Containers expire after 20 minutes of inactivity and cannot be reactivated |
| Persistence | Session reuse by identifier; files in /mnt/data for the session’s life. Snapshots are not documented; sessions are ephemeral | Files and state persist while the container is active; reusable by container ID; snapshots are not documented |
| Snapshots / pause | Not documented / Not documented | Not documented / No |
| GPU | Not documented | Not documented |
| Networking | Per-pool egress setting; egress disabled by default | No outbound network by default; Hosted Shell can allow specific domains via an org allowlist and per-request network policy, with credential placeholders |
| Pricing | 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 | 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 |
| Free tier | None stated for dynamic sessions | Not documented |
| Compliance | Not documented | Not documented |
| Regions | 38 Azure regions listed in the docs | Not documented |
| Company headquarters | Redmond, Washington, United States | San Francisco, California, United States |
| Good fit for | Azure-native apps running LLM-generated Python or Node code with egress off by default | Apps 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?
What is the difference between Azure Container Apps dynamic sessions and OpenAI Code Interpreter & Hosted Shell?
Which is open source, Azure Container Apps dynamic sessions or OpenAI Code Interpreter & Hosted Shell?
How do Azure Container Apps dynamic sessions and OpenAI Code Interpreter & Hosted Shell isolate code?
How does Azure Container Apps dynamic sessions pricing compare with OpenAI Code Interpreter & Hosted Shell?
Can you self-host Azure Container Apps dynamic sessions or OpenAI Code Interpreter & Hosted Shell?
How long can sessions run on Azure Container Apps dynamic sessions and OpenAI Code Interpreter & Hosted Shell?
Do Azure Container Apps dynamic sessions and OpenAI Code Interpreter & Hosted Shell support snapshots or pause and resume?
Sources
- learn.microsoft.com/en-us/azure/container-apps/sessions
- learn.microsoft.com/en-us/azure/container-apps/sessions-code-interpreter
- learn.microsoft.com/en-us/azure/container-apps/session-pool
- azure.microsoft.com/en-us/pricing/details/container-apps/
- developers.openai.com/api/docs/guides/tools-code-interpreter
- developers.openai.com/api/docs/guides/tools-shell
- 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/