Delegate to Codex
codex_taskDelegate coding prompts to OpenAI Codex running locally through your ChatGPT/Codex subscription for reviews, refactors, tests, or codebase research.
Instructions
Delegate a task to OpenAI Codex, running codex exec on this computer with the user's own ChatGPT/Codex subscription. Good for a second opinion or code review, implementing a well-scoped change, refactors, writing tests, or digging through a codebase. Write a self-contained prompt: goal, relevant files, constraints, and what to report back. Codex works in cwd; with sandbox workspace-write it can edit files there. Returns Codex's final message plus a session_id that continues the same Codex session. Runs longer than wait_seconds return a job_id — poll it with codex_job.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Absolute path of the working folder (required for a new task). | |
| model | No | Codex model slug (see codex_models). Omit to use the user's default. | |
| images | No | Absolute paths of images to attach. | |
| prompt | Yes | Complete instructions for Codex. | |
| network | No | Allow network inside workspace-write (e.g. package installs). Default false. | |
| sandbox | No | Default workspace-write. read-only = analyse only. | |
| add_dirs | No | Extra writable folders (new tasks only). | |
| session_id | No | Continue an earlier Codex session instead of starting fresh. | |
| wait_seconds | No | Seconds to wait before returning a job_id (0-240, default 50). | |
| reasoning_effort | No | low | medium | high | xhigh | max | ultra — support varies per model (see codex_models). Omit for the default. |