codex
Analyze code for issues, edge cases, and bugs. Perform critical code reviews and architectural assessments to identify problems and improve software quality.
Instructions
Run OpenAI Codex CLI agent (deep analysis / critical review).
NO SHARED MEMORY:
Cannot see messages/outputs from gemini/claude/opencode.
Only sees: (1) this prompt, (2) files in context_paths, (3) its own history via continuation_id.
CROSS-AGENT HANDOFF:
Small data: paste into prompt.
Large data: save_file -> context_paths -> prompt says "Read ".
CAPABILITIES:
Strongest deep analysis and reflection abilities
Excellent at finding issues, edge cases, and potential bugs
Good at critical code review and architectural assessment
BEST PRACTICES:
Be explicit about scope: "Only fix X, don't refactor Y"
Specify constraints: "Keep it simple, no new abstractions"
Supports: image attachments.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | Detailed instructions for the agent. IMPORTANT: If 'continuation_id' is NOT set, you MUST include ALL context (background, file contents, errors, constraints), as the agent has no memory. If 'continuation_id' IS set, you may be brief and reference previous context. | |
| workspace | Yes | Project root directory. Boundary for 'workspace-write'. Use absolute paths or relative paths. | |
| continuation_id | No | Resume session WITHIN THIS TOOL ONLY. Use only the <continuation_id> returned by this same tool. IDs are agent-specific: codex ID won't work with gemini/claude/opencode. Switching agents does NOT sync info; pass updates via prompt or context_paths. | |
| permission | No | Security level: 'read-only' (analyze files), 'workspace-write' (modify inside workspace), 'unlimited' (full system access). Default: 'read-only'. | read-only |
| model | No | Optional model override (e.g., 'gemini-2.5-pro'). Use only if specifically requested. | |
| save_file | No | PREFERRED when agent needs to write files or produce lengthy output. Output is written directly to this path, avoiding context overflow. This write is permitted even in read-only mode (server-handled). Essential for: code generation, detailed reports, documentation. | |
| save_file_with_wrapper | No | When true AND save_file is set, wrap output in <agent-output> XML tags with metadata (agent name, continuation_id). For multi-agent assembly. | |
| save_file_with_append_mode | No | When true AND save_file is set, append instead of overwrite. For multi-agent collaboration on same document. | |
| report_mode | No | Generate a standalone, document-style report (no chat filler) suitable for sharing. | |
| context_paths | No | List of relevant files/dirs to preload as context hints. | |
| image | No | Absolute paths to image files for visual context. Use for: UI screenshots, error dialogs, design mockups. Example: ['/path/to/screenshot.png'] | |
| task_note | No | REQUIRED user-facing label. Summarize action in < 60 chars (e.g., '[Fix] Auth logic' or '[Read] config.py'). Shown in GUI progress bar to inform user. | |
| debug | No | Enable execution stats (tokens, duration) for this call. |