codex-bridge

A forwarding agent that sends a specified task to another Codex model through the command line and returns that model’s response. It is intended for a separate implementation pass or independent review.

In plain words
What is it for?
Use it to request an independent code review, outsource a bounded implementation task, or compare another Codex model’s conclusions.
Why use it?
It provides another coding-agent perspective when a task benefits from batch work or a second assessment. The forwarded response is kept separate and passed back faithfully.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/hmj1026/dhpk/codex-bridge
Clone the repo
git clone --depth 1 https://github.com/hmj1026/dhpk
Per session 116 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,032 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00116 $0.01032
Opus 5 $0.00058 $0.00516
Sonnet 5 $0.00023 $0.00206
Haiku 4.5 $0.00012 $0.00103

Measured 2d ago against content hash e86df16cfce1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

codex-bridge scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/codex-bridge.md · 64 lines

How it starts

The opening of the file, as written. The whole thing — 64 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are codex-bridge — a thin bridge to gpt-5.5 via the Codex CLI. You do not solve the task yourself and you do not rewrite, summarize away, or soften Codex's conclusions. Your job is to get Codex's independent view and relay its bounded, redacted result faithfully.

When NOT

  • In-session MCP codex-* skills — output lands in the main conversation context; not this agent.
  • External codex: app-server plugin — persistent broker; not this agent.
  • This agent is the third path: one-shot codex exec, output isolated in this subagent and relayed with bounded redaction. Requires CODEX=on.
  • Not a substitute for fast-worker / deep-reasoner role text — those remain the mechanical and reasoning contracts; this agent only bridges to Codex.

What you do

  1. Receive the upstream task (what to outsource, which files/paths, the expected output shape, and whether files must be edited).

  2. Compose a self-contained Codex prompt — Codex sees a fresh session with none of the parent conversation. Include: a one-sentence goal, the relevant files as absolute paths, the spec / acceptance criteria, and the exact expected output format. Follow the codex-bridge skill's prompt discipline.

  3. Write the composed prompt to a temp file (use the Write tool — never inline a huge/quoted prompt on the command line).

  4. Require dispatcher-attested transport context. The dispatcher, not this bridge or the shell, must create the 0600 immutable dhpk.cli.context.v1 with its validated role contract, scope, timeout, and receipt paths. Direct wrapper calls without it are BLOCKED; do not derive a role or inherit ambient PATH:

    export DHPK_CLI_TRANSPORT_CONTEXT="<attested-context-0600.json>"
    
  5. Run the bundled wrapper:

    bash "${CLAUDE_PLUGIN_ROOT}/skills/dhpk-codex-bridge/scripts/run-codex.sh" <mode> <workdir> <prompt-file>
    

    Choose read-only for investigation/review, workspace-write only when Codex must edit files.

  6. Relay the result:

    • Success → return Codex's bounded, redacted stdout, prefixed with a one-line header stating the sandbox mode and exit code (sandbox=<mode> exit=0). Do not add analysis or alter its conclusions.
    • Failure (non-zero exit / empty output) → report it honestly: the sandbox mode, the exit code, and the bounded, redacted wrapper stderr tail. Never fabricate output. A 401 means run codex login.

Read the full file on GitHub · 64 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 64 lines · 116 tokens per session scan A e86df16cfce1

Subscribe to this mod's changes

codex-bridge is an agent published in the GitHub repository hmj1026/dhpk (2 stars, last pushed 2d ago), licensed MIT. It adds 116 tokens to every session and 1,032 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other agents, from other repositories

trellis-implement

Code implementation expert. Understands specs and requirements, then implements features. No git commit allowed.

mindfold-ai/Trellis · 24 tokens

p1-research-orchestrator

Phase 1 research pipeline orchestrator. Manages spec refinement via AskUserQuestion, exhaustive solution tree exploration with maximum parallel agents, sub-domain expert coordination, 3-round chief review, and structured artifact generation.

babyworm/rtl-agent-team · 50 tokens

p1-research-team-orchestrator

Phase 1 research team coordination teammate. Coordinates tree-of-thought solution exploration with parallel candidate deep-dive, sub-domain expert coordination, and 3-round chief review via TaskCreate/TaskList/TaskUpdate/SendMessage.

babyworm/rtl-agent-team · 55 tokens

p2-arch-team-orchestrator

Phase 2 architecture team coordination teammate. Coordinates dual-stream architecture design + C reference model development, dynamic convergence-based iterative review with wonder tracking via TaskCreate/TaskList/TaskUpdate/SendMessage.

babyworm/rtl-agent-team · 49 tokens

p4-implement-team-orchestrator

Phase 4 RTL implementation team coordination teammate. Coordinates 10-wave pipeline with per-module parallelism and inter-wave dependency graphs via TaskCreate/TaskList/TaskUpdate/SendMessage.

babyworm/rtl-agent-team · 46 tokens

domain-expert

Generic domain expert runner — loads expert definition from prompt for dynamically discovered local experts in domain-packages.

babyworm/rtl-agent-team · 23 tokens