Run a task with the local Codex CLI
codex_runDelegate a coding task to a local CLI agent that writes and runs code, installs packages, and calls APIs in an isolated workspace, then returns the output and any created files.
Instructions
Hand a natural-language task to the local Codex CLI coding agent. Codex can write and run code, install packages and call APIs inside an isolated workspace folder, then this returns its output plus any files it created. Blocking: it does not return until Codex finishes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Override the Codex model for this run. | |
| prompt | Yes | The task for Codex, written as you would to a developer. | |
| workspace | No | Relative workspace folder name under the workspace root. Reuse the same name to continue working on the same files. Defaults to a new timestamped folder. | |
| timeout_sec | No | Seconds before Codex is killed. Default 300. |