Run AI-powered tasks using OpenAI Codex CLI...
Execute tasks using OpenAI Codex CLI and analyze results.
Codex runs in read-only sandbox mode. It cannot:
Always ask Codex to output results directly to stdout. Do not request file creation or modification - instead, ask Codex to print/output the code or results, which Claude can then save if needed.
codex exec --model gpt-5.2-codex "PROMPT"
Structure prompts with three sections:
# Role
[Describe the role/persona for the task]
# Context
[Include relevant information:]
- File paths and links to documentation
- Memory files or conversation context
- Additional task-relevant details
# Task
[Clear task description]
[Expected deliverables]
codex exec --model gpt-5.2-codex "# Role
Senior code reviewer with expertise in security and best practices.
# Context
Repository: /path/to/project
Files changed: src/auth.py, src/api.py
Branch: feature/user-auth
# Task
Review changes against develop branch.
Search for security issues, bugs, and suggest improvements.
Output your findings and recommendations to stdout."
Note: Always phrase tasks to output results rather than create/modify files. For code generation, ask Codex to "print the code" or "output the script" instead of "create a file".
After codex completes, evaluate: