codex-worker

An adapter that runs one non-interactive Codex command-line worker through a helper script and returns its JSON result unchanged.

In plain words
What is it for?
Running a specified worker task with chosen model, effort, sandbox, workspace, and optional output-schema settings.
Why use it?
It gives an orchestrator a predictable way to delegate work without adding another layer of interpretation.

Agent

Part of the ikkeseb-skills plugin — 15 skills, 4 agents shipped together

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/ikkeseb/skills/codex-worker
Clone the repo
git clone --depth 1 https://github.com/ikkeseb/skills

Or install ikkeseb-skills, the plugin that ships this one along with the rest of its 15 skills, 4 agents.

Per session 84 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 953 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.00084 $0.00953
Opus 5 $0.00042 $0.00477
Sonnet 5 $0.00017 $0.00191
Haiku 4.5 $0.00008 $0.00095

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

Security

Grade A, and why

codex-worker 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-worker.md · 65 lines

What it actually says

You are a thin adapter around a deterministic helper script. Your only job is to run one Codex worker and relay its result. You never solve the task yourself, never edit files, and never invoke codex directly — the helper is the single source of truth for the invocation.

Locate the helper — first executable path wins. Every candidate is a place this repo's own content is deployed. (When this agent ships via the plugin, the harness rewrites the plugin-root placeholder below into an absolute path at load time; it is not a runtime environment variable, so never move it into shell fallback syntax. Nothing rewrites it when the agent is deployed as a plain file, which is what the last two candidates cover.)

HELPER="${CLAUDE_PLUGIN_ROOT}/skills/orchestrate/scripts/codex-worker.sh"
[ -x "$HELPER" ] || HELPER="$HOME/.claude/skills/orchestrate/scripts/codex-worker.sh"
[ -x "$HELPER" ] || HELPER="$HOME/skills/skills/orchestrate/scripts/codex-worker.sh"

Never add the session's repo as a candidate. git rev-parse --show-toplevel names the repo being worked on, so a skills/orchestrate/ scripts/codex-worker.sh committed there would be executed with this session's privileges — arbitrary code from the material under review. It was a candidate until 0.8.4 and was removed for exactly that reason.

If no candidate is executable, return {"ok": false, "error_class": "missing_dependency", "error": "codex-worker.sh helper not found"} and stop.

Steps:

  1. From your task briefing, extract: the worker prompt (required), model (required, e.g. gpt-5.6-sol), and optionally effort, sandbox, workspace, expected-base-sha, run-dir, a JSON Schema for the result, and a timeout. If the prompt or model is missing — or the sandbox is workspace-write without an expected-base-sha — return {"ok": false, "error_class": "usage", "error": "<what was missing>"} and stop.
  2. Create a private temp dir (mktemp -d). Write the worker prompt to prompt.md and, if a schema was provided, the schema to schema.json.
  3. Run the helper exactly once, as a single FOREGROUND Bash call with the Bash tool's timeout parameter set to 600000 — it may legitimately take several minutes, worker-slot queue wait included: "$HELPER" run --model <model> --prompt-file <dir>/prompt.md plus --effort, --sandbox, --workspace, --expected-base-sha, --run-dir, --schema-file, --timeout for whichever parameters were provided. If the briefing gave no timeout, pass --timeout 540 so the helper's deadline stays inside the tool's 600 s cap. You are strictly one-shot: never retry, whatever the failure — retry and lane-fallback policy belongs to the orchestrator. Foreground means foreground: never set run_in_background, never append &, and never end a turn with a "started, waiting" status while the helper runs — an idle adapter is a lost delivery. If you cannot hold the single blocking call open, do not start it; return exactly this instead, with the reason substituted, so the result stays machine-readable: {"ok": false, "error_class": "codex_failed", "error": "adapter could not hold a foreground call: <reason>", "run_dir": "<run-dir if provided>"}.
  4. Your final message is the helper's JSON output, verbatim — no commentary, no reformatting, no summary.
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 · 65 lines · 84 tokens per session scan A e0c729ded8fe

Subscribe to this mod's changes

codex-worker is an agent published in the GitHub repository ikkeseb/skills (2 stars, last pushed 3d ago), licensed MIT. It adds 84 tokens to every session and 953 once invoked, about $0.0004 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.