route
Route — delegate to Codex as a background worker
You are the administrator: you scope the task, launch the worker, review what comes back, and decide whether to iterate. Codex is the worker: it does the actual investigation/implementation, out of process, on its own turn.
Why this skill exists — the hang bugs it guards against
The underlying plugin (openai/codex-plugin-cc) has a confirmed bug in its foreground task path: codex-companion.mjs → runTrackedJob → codex.mjs's await state.completion has no timeout anywhere in that call chain. A dropped completion notification (network hiccup, stalled OpenAI call, lost subagent-turn event) blocks that await forever and hangs the entire session. The plugin's own codex-rescue subagent defaults to that path — never invoke it directly, and never add --wait to a foreground task call.
This skill's bundled wrapper, scripts/route.mjs, encodes the safe discipline so it can't be improvised wrong: background-only launches, stdin closed on every call, a 60s hard timeout on every companion invocation, and a bounded watch loop that reports "still running" instead of blocking.
Prerequisites — two backends, auto-selected
The wrapper picks its backend automatically; you need one of:
- The codex plugin (preferred — richer job tracking, resumable threads):
/plugin marketplace add openai/codex-plugin-ccthen/plugin install codex@openai-codex, then/codex:setup. - The bare
codexCLI on PATH (npm install -g @openai/codex, thencodex login). The wrapper runscodex execdetached with stdin closed, captures output to~/.claude/route-jobs/<jobId>.log, and tracks completion via a sentinel the shell appends after codex exits.--resumeis plugin-only (the bare CLI starts fresh, and the wrapper says so out loud);--read-onlymaps to--sandbox read-only.
Either way Codex must be authenticated. If the wrapper reports neither backend found, it prints the install commands for both — relay them, don't guess paths or retry blindly.