← Back
OpenAI
OpenAI equips Responses API with computer environment for autonomous agents
OpenAI API · featureapiplatformrelease · openai.com ↗

Shell Tool and Container Workspace

OpenAI has expanded the Responses API with a shell tool that allows models to execute commands through the command line, dramatically expanding what agents can accomplish. Unlike the existing code interpreter which only runs Python, the shell tool supports the full Unix tooling ecosystem—grep, curl, awk, and beyond—enabling models to run Go, Java, Node.js services, and perform complex file operations.

Agent Loop Orchestration

The Responses API now handles the complete agent orchestration cycle: it assembles model context, receives shell command proposals from the model, executes those commands in an isolated container, and streams results back to the model in near real-time. This enables tight feedback loops where the model can inspect results and issue follow-up commands without human intervention.

Key capabilities include:

  • Concurrent execution: Multiple shell commands execute in parallel across separate container sessions
  • Streaming output: Real-time feedback allows models to decide when to wait, issue new commands, or finalize responses
  • Output bounding: Context-efficient truncation of large outputs while preserving beginning and end content
  • Isolated environments: Filesystem, optional structured storage (SQLite), and restricted network access provide security boundaries

Context Management

Long-running agent tasks present a challenge: they fill the context window, limiting the model's reasoning window across turns. OpenAI addresses this through automatic context compaction that preserves key details while removing extraneous information, allowing agents to operate sustainably over extended workflows.

Developer Impact

Developers no longer need to build custom execution environments, workflow systems, or handle timeouts and retries manually. The platform manages these concerns out of the box. Models must be GPT-5.2 or later to propose shell commands. The Responses API documentation provides migration guidance for existing API users transitioning to this new capability.

This represents a fundamental shift from discrete tool use to genuine agent capabilities—models can now propose and execute real-world tasks across the entire stack, from data fetching to report generation, within a secure and managed infrastructure.