Bounding shell command output to manage context
Cap shell command output to prevent large logs from consuming context budgets.
The model specifies an output cap per command. The Responses API enforces this cap, returning a bounded result that preserves the beginning and end of the output, marking omitted content.
Large shell command outputs consume context budgets without adding useful signals, overwhelming the model.
Default behavior of shell commands is to return all output, which can be extensive.
To prevent large shell command outputs from overwhelming LLM context windows, specify an output cap. The Responses API enforces this, returning a bounded result that includes the start and end of the output.
- From model to agent: Equipping the Responses API with a computer environment ↗OpenAI · OpenAI News · Mar 11, 2026 · paraphrased
First seen on Subvolts Mar 11, 2026. Updated Sep 11, 2026. Spotted a problem? Tell us.
- From model to agent: Equipping the Responses API with a computer environmentOpenAI · OpenAI News · Mar 11, 2026
The Playbook: reusable how-tos, prompts, configs and tips pulled out of the news.
- HeuristicUsing shell tool for broad LLM capabilitiesThe shell tool dramatically enhances LLM power by enabling command-line interaction for diverse tasks. · 15 min
- HeuristicDefine task completion clearly to avoid premature stoppingExplicitly define what 'done' means for a task to ensure AI models complete the full scope. · 10 min
- Anti-patternBuilding agent infrastructure from scratchAvoid piecing together agent infrastructure; use standardized SDKs and native sandbox support. · 5 min
- Setting tipAgent workspace portability with Manifest abstractionUse the Manifest abstraction to describe agent workspaces for portability across different providers. · 10 min
- ToolOpenAI Agents SDK for building agentsSDK for building agents that can inspect files, run commands, edit code, and work on long-horizon tasks. · 15 min
- Anti-patternOverly specific instructions for advanced AI modelsAvoid detailed itineraries; newer models handle nuance and ambiguity better. · 10 min
Questions people ask
- Which AI tools does this work with?
- The sources used it with ChatGPT.
- Where did this come from?
- OpenAI (OpenAI News). Subvolts collected, normalized and credited it; the link above opens the original.

