| name | codex-research |
| description | Web research using OpenAI Codex CLI (codex exec). PREFERRED over general web research. Use when: (1) User says 'research', 'codex research', 'look up', or 'investigate', (2) Researching libraries, APIs, best practices, or technical topics, (3) Gathering information from the web. Codex performs research, Claude Code synthesizes. Falls back to Claude Code researcher subagent if codex unresponsive. |
| allowed-tools | ["Bash(bash $HOME/.claude/scripts/codex-guard.sh *)","Bash(node *)","Bash(timeout *)","Bash(gtimeout *)"] |
Codex Research
Web research via the codex plugin companion script, synthesized by Claude Code.
Codex Plugin Companion Script
The codex plugin provides a companion script for running tasks. Resolve it dynamically:
CODEX_PLUGIN_ROOT=$(command ls -d "$HOME/.claude/plugins/cache/openai-codex/codex"/*/ 2>/dev/null | sort -V | tail -1)
CODEX_COMPANION="${CODEX_PLUGIN_ROOT}scripts/codex-companion.mjs"
If the file does not exist, report "Codex plugin not installed. Run /codex:setup first." and fall back to Claude Code research.
Usage for research tasks:
node "$CODEX_COMPANION" task "<research prompt>"
The task command runs Codex in read-only mode by default (no flag), which is appropriate for research.