Run Prompt
AI-generatedSummary
Send a prompt to the Codex CLI and run it with customizable options to capture its response in text, structured summary, or raw JSON event formats.
Inputs
- Prompt (required) — The instruction string sent to Codex as the prompt for execution.
- Output Format (required) — Specifies the format of the response: 'text' for plain CLI output, 'structured' for a parsed summary of JSON events, or 'json' for full raw JSON event logs.
- Model — Identifier for the model to use (e.g., gpt-5.2). Leave empty to use Codex's default model.
- Working Directory — Filesystem directory path passed to Codex as the working directory (with --cd), also used as the process's current working directory.
- Resume Mode (required) — How to manage session state: start a new session, resume the most recent one, or resume by a specific session ID.
- Session ID — Specific session ID to resume when Resume Mode is set to 'sessionId'.
- Sandbox Mode (required) — Codex sandbox policy controlling the permissions of generated shell commands, with modes such as default, read-only, workspace-write, or full access.
- Approval Policy (required) — Specifies when Codex should request approval before executing commands, options include default, untrusted, on request, or never.
- Bypass Approvals and Sandbox — Boolean flag to bypass sandboxing and approvals; use only in externally sandboxed environments.
- Additional Options — Collection of advanced parameters including additional writable directories, extra CLI arguments, Codex binary path, config overrides, feature toggles, environment variables, ephemeral session flag, and other Codex CLI options.
Output shape
a list of JSON objects each representing Codex's response for an input item
Each output item contains a JSON object where the structure depends on the 'Output Format' choice: 'text' returns CLI stdout text and optional stderr; 'structured' returns a parsed summary with fields like finalResult, sessionId, messages, and error indicators; 'json' returns all raw JSONL event objects from Codex. The operation supports multiple input items with individual outputs. Errors during execution produce an error object unless 'continueOnFail' is enabled.