OpenAI has upgraded its Responses API to support agent‑style workflows by integrating a shell tool and hosted container workspaces. The API can now receive a prompt that instructs a model to use the shell tool, then forwards the model’s proposed shell commands to a container runtime. Output from the container is streamed back to the model in real time, allowing the model to decide whether to wait, issue additional commands, or produce a final answer. The system supports concurrent execution of multiple shell commands in separate container sessions, multiplexing their outputs into structured tool responses. To prevent large terminal logs from exhausting the model’s context window, the API enforces an output cap per command, preserving the beginning and end of the output while marking omitted content. Long‑running tasks can otherwise fill the context window; to address this, OpenAI introduced native context compaction. Models trained to analyze prior conversation state can produce a compacted representation that preserves key details in an encrypted, token‑efficient form. Server‑side compaction can be configured with a threshold, automatically handling timing and allowing slightly larger effective input windows. The system is designed to work with any OpenAI model release, and early use by Codex helped refine the compaction mechanism. This architecture enables developers to build secure, scalable agents that can run services, fetch API data, and generate artifacts such as spreadsheets or reports without writing custom orchestration code.
From model to agent: Equipping the Responses API with a computer environment
OpenAI has extended its Responses API to include a computer environment that lets language models act as agents. By adding a shell tool and hosted container workspaces, the API can execute commands, manage files, and handle networking in isolated sessions. The system streams command output back to the model, supports concurrent execution, and enforces output caps to keep context manageable. It also introduces native context compaction to preserve key information across long, multi‑step workflows. These features enable developers to build secure, scalable agents without writing custom orchestration code.
Why it matters
By providing a built‑in execution environment, OpenAI lowers the barrier for developers to deploy complex, secure agents, accelerating AI‑driven automation across industries.