Runs one prompt through headless Codex and captures the result. Use for one-shot exec runs or CI steps. Not for batches or retries.
Ships in boshu2-agentops. 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.
Run exactly one caller-supplied Codex prompt as one process and capture its result. This skill does not choose work, retry, validate or continue. It worked when the command closes stdin, uses the sandbox the declared effects need, runs under one deadline fixed before the first attempt, and the report names the exit code's meaning instead of calling a timeout a result.
-s read-only for review or analysis,
workspace-write only for authorized edits, and network or wider access only
when the caller explicitly requires those effects. "In case it needs it" is
not a declared effect. -s limits only Codex's shell commands; MCP servers
still start from the user's config.toml and from installed Codex plugins.
For review and CI add --ignore-user-config (skips config.toml; auth
still loads) and, when the run needs no plugin skill, --disable plugins.
On codex-cli 0.163.0 --ignore-user-config alone still started the servers
that plugins declare; --disable plugins stopped them and also removed
every plugin skill from the run. Report any MCP server the run can still
start as an undeclared effect. A permission denial inside the run (EPERM,
"Operation not permitted") shows only what the mode blocks, not whether the
host or the code would fail. Quote it and list the check under
not_as_briefed as sandbox-limited: neither a pass nor a failed check. A
host-side observation still stands; a host run is the caller's decision.--ephemeral writes no session
file under $CODEX_HOME/sessions. A validator whose
judgment receipt the
caller requires runs without --ephemeral, and the caller copies that
run's rollout-*.jsonl into protected evidence storage. Add --ephemeral
only when no receipt is required.codex exec reads the prompt from stdin when no prompt
argument is given, and appends piped stdin to a prompt argument. A non-TTY run
(CI, a script) with an open stdin can wait forever: the stdin hang. Feed
the prompt on stdin and let it end, or redirect </dev/null.In an AgentOps source checkout, use the guarded library. It enforces the deadline, the combined output cap (10 MiB default), process-group cleanup and echo detection:
# AGENTOPS_ROOT: the agentops source checkout. DEADLINE_EPOCH: absolute Unix
# time fixed once by the caller and reused by every invocation in its scope.
. "$AGENTOPS_ROOT/scripts/lib/codex-exec.sh"
CODEX_EXEC_EXTRA_ARGS=(--ignore-user-config) # add --ephemeral only when no receipt is required
CODEX_EXEC_DIR="$WORKSPACE" CODEX_EXEC_SANDBOX=read-only \
CODEX_EXEC_PROMPT_FILE="$PROMPT_FILE" CODEX_EXEC_DEADLINE_EPOCH="$DEADLINE_EPOCH" \
CODEX_EXEC_MAX_OUTPUT_BYTES=10485760 CODEX_EXEC_OUT_FILE="$OUTPUT" \
codex_exec_guarded </dev/null
Outside a Git repository add CODEX_EXEC_SKIP_GIT_CHECK=1; to keep the final
message outside the cap, add -o "$LAST" to that array (assigned on its own line).
An installed skill ships no scripts, so scripts/lib/codex-exec.sh is absent
outside a source checkout. Run codex exec directly instead, with bash or zsh
(flags as of codex-cli 0.163.0; confirm with codex exec --help; add
--skip-git-repo-check and -o <file> as above):
case "${DEADLINE_EPOCH:-}" in ''|0*|*[!0-9]*) echo "no valid deadline; not launched" >&2; exit 2;; esac
TO=$(command -v timeout || command -v gtimeout) || { echo "no timeout; not launched" >&2; exit 2; }
remaining=$(( DEADLINE_EPOCH - $(date +%s) - 10 )) # keep the 10 s KILL grace inside
[ "$remaining" -gt 0 ] || { echo "deadline passed or within 10 s; not launched" >&2; exit 124; }
set -o pipefail # bash and zsh: $? is the failing stage, not head's
"$TO" -k 10 "$remaining" \
codex exec --ignore-user-config -C "$WORKSPACE" -s read-only - <"$PROMPT_FILE" 2>&1 \
| head -c 10485760 >"$OUTPUT"
rc=$? # 124 timed out, 137 killed after grace, 127 no codex, else codex's status
An output file exactly at the cap was truncated, and its status reflects the closed pipe, not a review. The fallback has no survivor check or echo detection; report both as not enforced.
| Exit | Meaning |
|---|---|
| 0 | Codex completed and produced output |
| 2 | precondition: binary missing, bounds invalid or missing, capability unavailable, or cleanup unverified; not a result |
| 122 | descendants survived Codex's exit; degraded run |
| 123 | capture or prompt-preparation cap reached; partial evidence kept |
| 124 | deadline expired, or a clean exit with empty output; a stall, not a result |
| 125 | output repeats the prompt; not a result |
| 128+N | cancelled by signal N (129 HUP, 130 INT, 143 TERM) |
| other | Codex's own nonzero status, preserved |
Reserved codes are runtime evidence, never a semantic verdict. A Codex 124 or
137 returns 124 with the STALL line; a Codex 2, 122, 123, 129, 130 or 143
returns with no codex-exec: stderr line, so check stderr, the capture and
elapsed time before reading one as the runner's.
Guarded runner internals covers inputs, host
requirements, process supervision and the external sandbox wrapper.
command: exact argv or library call (prompt by reference)
sandbox: -s value and the declared effect that needs it
bound: absolute deadline and seconds remaining at launch
capture: output path, byte cap, truncated yes/no
exit: status and its meaning from the table
cleanup: library result, or "not enforced" for the direct fallback
not_as_briefed: steps the output reports refused or sandbox-limited, quoted | none reported
A Codex validator follows the judgment receipt convention and the model-dispatch recipe: a requested model flag or the model's own description does not prove which model ran.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
28 skills in this plugin
/agy-nativeRun a supplied task in headless AGY (Antigravity, Gemini) and collect its result. Use when: AGY, Antigravity or Gemini is requested by name; never a fallback./architectureCompare interface designs and find structural friction. Use when: a change spreads across modules or a boundary is unclear. For code changes, use Refactor./claude-execRun one prompt through headless Claude with scoped permissions and a time bound. Use when: scripting or automating a `claude -p` call, even a simple one./councilCompare independent opinions from models or contexts without inflating agreement. Use when: wanting several opinions or a debate, or summarizing several reviewers' results./craft-goalDraft or lint a bounded long-running goal prompt with a finish line and hard limits. Use when: asked to craft or lint a goal (a /goal prompt); one change goes to Plan./docWrite source-checked docs, READMEs, change descriptions and handoffs. Use when: documenting a change, leaving or resuming a handoff, or drafting a questionnaire for someone else./boshu2-agentops:codex-execfrom boshu2-agentops
boshu2-agentops@cascade-code-devops-misc-1 is listed by joshuarweaver/cascade-code-devops-misc-1 — review the source before installing
npx claudepluginhub joshuarweaver/cascade-code-devops-misc-1 --plugin boshu2-agentops2 plugins in one repository ship this exact skill · first indexed Nov 29, 2026
Other plugins' skills for the same job