Codex Bridge
by @abeperl
Dispatch coding tasks to the local OpenAI Codex CLI with background execution, status polling, and answerable clarifying questions. Use when OpenClaw should...
clawhub install codex-bridgeπ About This Skill
name: codex-bridge description: Dispatch coding tasks to the local OpenAI Codex CLI with background execution, status polling, and answerable clarifying questions. Use when OpenClaw should delegate script building, code edits, refactors, or multi-step coding work to Codex from the command line. metadata: openclaw: emoji: "π§°" requires: bins: ["python3", "codex"]
Codex Bridge
Delegate coding tasks from OpenClaw to the local codex CLI and manage them asynchronously.
This skill provides a file-based bridge so OpenClaw can:
When to Use
When NOT to Use
Dispatch a Task
~/.openclaw/skills/codex-bridge/codex-bridge-dispatch.sh \
--task-id \
--workdir \
--prompt ""
Prompt Writing
Include:
Example:
~/.openclaw/skills/codex-bridge/codex-bridge-dispatch.sh \
--task-id scripts-csv-parser \
--workdir ~/projects/data-tools \
--prompt "Create parse_orders.py. Read orders CSV, keep shipped rows, group by customer_id, and write summary CSV with columns customer_id, order_count, total_amount. Use pandas. Add basic CLI args and error handling."
Check Status
~/.openclaw/skills/codex-bridge/codex-bridge-status.sh --task-id
Common status commands:
~/.openclaw/skills/codex-bridge/codex-bridge-status.sh --list
~/.openclaw/skills/codex-bridge/codex-bridge-status.sh --task-id --output
~/.openclaw/skills/codex-bridge/codex-bridge-status.sh --task-id --question
~/.openclaw/skills/codex-bridge/codex-bridge-status.sh --task-id --result
~/.openclaw/skills/codex-bridge/codex-bridge-status.sh --task-id --log
Answer Clarifying Questions
When status is waiting_for_answer, read the pending question and send a response:
~/.openclaw/skills/codex-bridge/codex-bridge-status.sh --task-id --question
~/.openclaw/skills/codex-bridge/codex-bridge-answer.sh --task-id --answer ""
The bridge resumes the same Codex session after the answer is written.
Workflow
1. Dispatch task with a clear prompt.
2. Report the task ID.
3. Poll status/output periodically.
4. If status becomes waiting_for_answer, read --question, relay to user, then write answer with --answer.
5. When status is complete, read --result and summarize outcomes.
6. If status is error, inspect --log and --output.
Notes and Limits
codex CLI (codex exec and codex exec resume).~/.codex-bridge/tasks// .--workdir.