Run Codex CLI
codex_runRuns Codex CLI non-interactively in a sandboxed working directory. Returns summaries of commands, file changes, and errors, with read-only access by default.
Instructions
Run the locally installed, logged-in Codex CLI non-interactively in a sandboxed working directory. Defaults to read-only. Use workspace_write only when writes are enabled server-side. Returns the final agent message plus command/file-change/error summaries.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | Yes | Absolute path to an allowed working directory. | |
| mode | No | read_only (default) or workspace_write. | read_only |
| model | No | Optional model override. | |
| prompt | Yes | Instructions for Codex. | |
| output_mode | No | final summary or full raw events. | final |
| timeout_seconds | No | Timeout in seconds (10-3600). |