codex
Run coding tasks in a new conversation and get a thread ID for follow-up replies, using your existing login and model.
Instructions
Run a task in a new Codex conversation. Returns threadId for codex-reply. Uses your existing Codex login and model. Set cwd to the project; use sandbox=workspace-write for edits. Long tasks emit progress. A failed/cancelled task may already have made changes: inspect before retrying.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Absolute project directory. For replies, defaults to the original directory. | |
| model | No | Optional model; otherwise use your existing Codex configuration. | |
| config | No | Per-call Codex overrides; does not edit global configuration. | |
| images | No | Existing local image paths. | |
| prompt | Yes | Task or follow-up prompt. May include code and newlines. | |
| sandbox | No | Default read-only. Use workspace-write for authorized edits. danger-full-access disables the sandbox and must be explicitly requested. | |
| add_dirs | No | Additional writable directories when sandbox=workspace-write. | |
| approval-policy | No | Non-interactive execution cannot show approval prompts; restricted operations fail instead of hanging. | |
| timeout_seconds | No | Default 3600 seconds. Cancellation stops the running process group. | |
| reasoning_effort | No |