Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Route every task to the right skill by enforcing skill discovery and invocation before any action
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/codex-tools.md
1# Codex Tool Mapping23Skills use Claude Code tool names. When you encounter these in a skill, use your platform equivalent:45| Skill references | Codex equivalent |6|-----------------|------------------|7| `Task` tool (dispatch subagent) | `spawn_agent` (see [Subagent dispatch requires multi-agent support](#subagent-dispatch-requires-multi-agent-support)) |8| Multiple `Task` calls (parallel) | Multiple `spawn_agent` calls |9| Task returns result | `wait_agent` |10| Task completes automatically | `close_agent` to free slot |11| `TodoWrite` (task tracking) | `update_plan` |12| `Skill` tool (invoke a skill) | Skills load natively — just follow the instructions |13| `Read`, `Write`, `Edit` (files) | Use your native file tools |14| `Bash` (run commands) | Use your native shell tools |1516## Subagent dispatch requires multi-agent support1718Add to your Codex config (`~/.codex/config.toml`):1920```toml21[features]22multi_agent = true23```2425This enables `spawn_agent`, `wait_agent`, and `close_agent` for skills like `dispatching-parallel-agents` and `subagent-driven-development`.2627Legacy note: Codex builds before `rust-v0.115.0` exposed spawned-agent28waiting as `wait`. Current Codex uses `wait_agent` for spawned agents. The29`wait` name now belongs to code-mode `exec/wait`, which resumes a yielded exec30cell by `cell_id`; it is not the spawned-agent result tool.3132## Environment Detection3334Skills that create worktrees or finish branches should detect their35environment with read-only git commands before proceeding:3637```bash38GIT_DIR=$(cd "$(git rev-parse --git-dir)" 2>/dev/null && pwd -P)39GIT_COMMON=$(cd "$(git rev-parse --git-common-dir)" 2>/dev/null && pwd -P)40BRANCH=$(git branch --show-current)41```4243- `GIT_DIR != GIT_COMMON` → already in a linked worktree (skip creation)44- `BRANCH` empty → detached HEAD (cannot branch/push/PR from sandbox)4546See `using-git-worktrees` Step 0 and `finishing-a-development-branch`47Step 1 for how each skill uses these signals.4849## Codex App Finishing5051When the sandbox blocks branch/push operations (detached HEAD in an52externally managed worktree), the agent commits all work and informs53the user to use the App's native controls:5455- **"Create branch"** — names the branch, then commit/push/PR via App UI56- **"Hand off to local"** — transfers work to the user's local checkout5758The agent can still run tests, stage files, and output suggested branch59names, commit messages, and PR descriptions for the user to copy.60