Skip to content

[Feature Request]: GPT-5.1 shell tool support #2229

@priyansh4320

Description

@priyansh4320

Is your feature request related to a problem? Please describe.

The shell tool allows the model to interact with your local computer through a controlled command-line interface. The model proposes shell commands; your integration executes them and returns the outputs. This creates a simple plan-execute loop that lets models inspect the system, run utilities, and gather data until they can finish the task.

Shell is available through the Responses API for use with GPT-5.1. It is not available on other models, or via the Chat Completions API.

when to uses

Automating filesystem or process diagnostics — For example, “find the largest PDF under ~/Documents” or “show running gunicorn processes.”
Extending the model’s capabilities — Using built-in UNIX utilities, python runtime and other CLIs in your environment.
Running multi-step build and test flows — Chaining commands like pip install and pytest.
Complex agentic coding workflows — Using other tools like
apply_patch
to complete workflows that involve complex file operations.

Response includes shell_call output items

When the model decides to use the shell tool, it will include one or multiple shell_call output items. Each shell_call output item has the following fields.

call_id is generated by the API and should be passed back in shell_call_output in the next request.
status indicates whether the tool call is completed or in_progress (in streaming mode).
action contains information for shell tool execution
commands: A list of shell commands that developers can execute concurrently in the local computer environment.
timeout_ms: Optional timeout that should be honored in shell execution.
max_output_length: Used to truncate the output when it’s too large. Developer needs to pass it back with the raw output in shell_call_output, and does not need to do the actual truncation.

{
    "type": "shell_call",
    "call_id": "...",
    "action": {
        "commands": ["ls -l"],
        "timeout_ms": 120000,
        "max_output_length": 4096
    },
    "status": "in_progress"
}

sources :

https://platform.openai.com/docs/guides/tools-shell#use-shell-tool-with-responses-api

Describe the solution you'd like

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions