/codex-bridge:codex-implementationfrom codex-bridge
Delegates bounded implementation tasks to Codex CLI for parallel or independent work. Write a standalone brief, dispatch via codex exec, verify results.
Ships in codex-bridge. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Delegate implementation to the configured Codex model through codex exec. You own the outcome: you write the brief, Codex writes the code, you verify, judge, and report.
Delegate when all three hold:
For multi-slice projects with human gates, use the architect-loop skill; this skill is the single-task primitive.
RUN_DIR="$(mktemp -d "${TMPDIR:-/tmp}/codex-run.XXXXXX")"
# 1) write the brief (§3) to "$RUN_DIR/brief.md" with the Write tool
# 2) dispatch:
codex exec \
-s workspace-write \
-C "$REPO_ROOT" \
--skip-git-repo-check \
-o "$RUN_DIR/result.md" \
"$(command cat "$RUN_DIR/brief.md")" </dev/null
Friction rules — each one earned:
</dev/null. Without a TTY, codex waits on piped stdin ("Reading additional input from stdin...").$(command cat ...) — long inline prompts break on shell quoting.$RUN_DIR/result.md, not stdout — stdout mixes transcript and token stats; -o is the clean final message.workspace-write for implementation, read-only for diagnosis/propose mode. Never danger-full-access or --dangerously-bypass-approvals-and-sandbox unless Peter explicitly asks.--json to the dispatch and watch the run — see §5 "Watch and steer".codex exec resume <session-id> "<delta>" </dev/null — same session keeps its context; send only the delta (see the Follow-up recipe).$REPO_ROOT need --add-dir <path>.codex exec --help over this file.Codex sees none of your conversation. The brief must stand alone: repo root, exact files, the relevant AGENTS.md conventions, allowed actions, the gate command, and acceptance criteria. Explicitly state whether commits, pushes, publication, messages, destructive operations, and production changes are authorized; absent a grant, forbid them. Tell the worker it is not alone and must preserve others' edits.
Structure it with XML blocks — library in references/prompt-blocks.md, fill-in templates in references/prompt-recipes.md. The Implementation recipe is the default; one task per run.
| Mode | When | How |
|---|---|---|
| In-place (default) | normal delegation | -s workspace-write in the current worktree |
| Worktree | you're editing in parallel, or churn is risky | Use an isolated worktree only within the user's branch/worktree policy; point -C at it and integrate authorized changes after verification |
| Propose | risky area; review before anything is written | Propose-mode recipe: -s read-only, Codex returns a unified diff, you review then git apply |
For long or risky delegations, inspect progress and steer when needed:
Dispatch in background with --json added. Events stream as JSONL to the task's output file: item.started/item.completed with every command, its output, and Codex's own narration.
Check at natural checkpoints (not on a timer), and read cheaply — never Read the raw stream (its aggregated_output fields embed whole file dumps and would flood your context). Glance with a filter:
tail -c 60000 "<task-output-file>" | grep '^{' | jq -r \
'select(.type=="item.completed") | .item
| select(.type=="agent_message" or .type=="command_execution")
| (.command // .text) | .[0:160]' | tail -20
That yields commands + Codex's narration only (~10x smaller than raw). Is Codex touching the right files? In scope? Not looping?
Off the rails → stop the background task, then steer: codex exec resume <session-id> "<corrective delta>" </dev/null. Capture the run's exact session ID and confirm resume support through installed help. Avoid --last when other runs may overlap.
Steer with deltas, not restarts: say what to stop and what to do instead ("STOP X. Change of plan: do Y."). Re-dispatch fresh only when direction changed so much that the old session context would hurt.
git status and git diff in the repo. Read every change Codex made — inspect the diff alongside recorded evidence.What Codex did (summary + touched files), what you verified and the results, anything you fixed or rejected. Failing tests are reported as failing, with output.
Use the host's actual agent capabilities and model policy. If it cannot select the requested Codex model natively, a bounded CLI wrapper may read this installed skill, compose the brief, dispatch it, and return the result plus verification evidence. Resolve the skill path through the active installation; do not hard-code a user's home directory. Do not add a wrapper when the parent can dispatch directly without losing useful parallel work.
| Symptom | Fix |
|---|---|
Not inside a trusted directory | keep --skip-git-repo-check, or run from a trusted project root |
Hangs printing Reading additional input from stdin... | you dropped </dev/null |
| Killed around 2 minutes | foreground Bash timeout — use the host's background/session mechanism |
| Codex reports sandbox-blocked writes | target is outside the workspace: --add-dir <path>, or reconsider scope |
Empty result.md | the run died before a final message — read the Bash call's stdout/stderr |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
2 skills in this plugin
npx claudepluginhub dedene/skills --plugin codex-bridgeOther plugins' skills for the same job